Giter Site home page Giter Site logo

Comments (10)

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by @GeertvanHorrik:

How would this translate into a validator? Can you give us more information how you see this? For example, would the ValidateMeeting provide an IValidator implementation?

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by @GeertvanHorrik:

concerning validation at class (entity) level:

http://jeffhandley.com/archive/2010/10/12/EntityLevelValidation.aspx
This describes it pretty good (especially the first paragraph)…

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by @GeertvanHorrik:

I don't want people having to specify both the validation class and the method. Still considering what's the best way to implement this.

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by @GeertvanHorrik:

Naming conventions are my first thought, but I don't want to force other developers to be forced into a specific naming convention.

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by facos:

Would it be possible to support just a ValidationAttribute at entity level?
I'm also not a friend of specifying both the validation class and the method but
since the CustomValidationAttribute is just a derivation of ValidationAttribute
everybody has the choice to take or not....

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by @GeertvanHorrik:

Improved the Validator implementation. Now the ModelBase checks once whether a IValidatorProvider is registered in the ServiceLocator. If so, it will automatically get the IValidator from the IValidatorProvider.

It is still overridable per model.

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by @GeertvanHorrik:

Written custom AttributeValidatorProvider which caches and should be very, very fast and is registered by default.

Now up to writing unit tests.

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Comment created by @GeertvanHorrik:

See the documentation:

https://catelproject.atlassian.net/wiki/display/CTL/Validationviaspecialmodelvalidators

from catel.

GeertvanHorrik avatar GeertvanHorrik commented on May 22, 2024

Issue was closed with resolution "Fixed"

from catel.

lock avatar lock commented on May 22, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from catel.

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.