Closed Alxandr closed 8 years ago
Hy @Alxandr, thanks for the feedback and the great idea. Would you say I'm correct that there are really two requests in your issue: a) when working with a validation 'model', it should add the inbrowser capabilities where possible (isRequired, etc) (we'll keep this issue for it) b) it should be possible to declare your validation in the view completely, by adding inbrowser capabilities and custom elements (see #7 )
About adding the inbrowser capabilities, would it be possible to provide some extra feedback about what type of inbrowser capabilities we might add, how you feel it's extensible and how we could get our own error messages to show up?
Thanks Jan
My PC just died so I'm writing this on the phone. apologize for any errors that might occur from this.
There are at least two aspects to the seashore, I should have described. the first one, is reading attributes such as required from the DOM, and automatically applying validations to those elements. This would allow browsers that does not support this natively , to support them nonetheless. Basically a polyfill kind of deal.
the second part of this issue, is to make sure that whenever there is an issue with the validation, it is reported to the validation model of the DOM. this is done by simply setting a string property on the input elements if I recall correctly.
the issue however, is that this has to be done whenever the values change. Is not enough to do this on call backs such as onsubmit. the beauty about these errors, is that they will actively prevent any forms from being submitted that contains errors.
Thanks for submitting this / commenting on this. At this time we are closing this because we have completely re-written and are deprecating the previous feature set. If you feel this should be re-opened please feel free to review this blog post and submit either again on this repository, or on the new validatejs bridge repository
Thanks again!
Discussion
TLDR:
Also: