Giter Site home page Giter Site logo

Comments (8)

lcszc avatar lcszc commented on September 26, 2024

IMO, they should have Field as prefix in some cases.

@RequiredField(errorMessage = "Error", autoDismiss = true)

In some others cases it will not be needed.

@Email()
@ConfirmEmail()
@CPF()
@Length()
[...]

from convalida.

wellingtoncosta avatar wellingtoncosta commented on September 26, 2024

I think adding a prefix in only some cases can be confused.

My idea about remove Validation suffix is to turn API less verbose.

Something like this: https://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/

from convalida.

lcszc avatar lcszc commented on September 26, 2024

I think adding a prefix in only some cases can be confused.

My idea about remove Validation suffix is to turn API less verbose.

Something like this: https://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/

  • @Required may conflict with other libraries.
  • @Length doesn't seems friendly (length for what?). Idk.

Anyway, removing the Validation suffix is valid.

from convalida.

wellingtoncosta avatar wellingtoncosta commented on September 26, 2024
  • @Required may conflict with other libraries.

@Required doesn't conflit with other libraries because the packages aren't the same.

  • @Length doesn't seems friendly (length for what?). Idk.

Well, it's another discussion. What do you think when you apply @Length(min=3, max=10, errorMessage=R.string.invalid_length) to a field?

from convalida.

lcszc avatar lcszc commented on September 26, 2024
  • @Required may conflict with other libraries.

@Required doesn't conflit with other libraries because the packages aren't the same.

  • @Length doesn't seems friendly (length for what?). Idk.

Well, it's another discussion. What do you think when you apply @Length(min=3, max=10, errorMessage=R.string.invalid_length) to a field?

That's seems ok.

from convalida.

kaioshenrique avatar kaioshenrique commented on September 26, 2024

I think it's okay to remove the suffix. The library itself already makes clear what its purpose is. Keeping the "Validation" suffix to me becomes redundant. 😄 🔥

from convalida.

emanuelet avatar emanuelet commented on September 26, 2024

Yeah, I'm on the same page. Removing the suffix is not a bad idea

from convalida.

wellingtoncosta avatar wellingtoncosta commented on September 26, 2024

Done! (122cd770)

from convalida.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.