-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CTL-43: Validation annotations at Class level #500
Comments
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? |
Comment created by @GeertvanHorrik: concerning validation at class (entity) level: http://jeffhandley.com/archive/2010/10/12/EntityLevelValidation.aspx |
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. |
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. |
Comment created by facos: Would it be possible to support just a ValidationAttribute at entity level? |
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. |
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. |
Comment created by @GeertvanHorrik: See the documentation: https://catelproject.atlassian.net/wiki/display/CTL/Validationviaspecialmodelvalidators |
Issue was closed with resolution "Fixed" |
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. |
Jira issue originally created by user facos:
[ValidateMeeting]
class MeetingModel : ModelBase
{
.....
}
The text was updated successfully, but these errors were encountered: