-
Notifications
You must be signed in to change notification settings - Fork 191
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
how to add fields validation message ? #60
Comments
i hack the jquery.repeater.js a bit by adding this code (looking for adding by Pat-Och below)
in repeater.js
|
Hi @pat-och i'm using validation in a repeater, and thanks to you i have the right label on data-validate-for. But I don't really know how can I actually validate the inputs and how to display some message under each input. |
if I remember well, as you usually do in your controller (you may need to reprocess your post data to be able to use them correctly in your controller) |
Sorry but not following you. I want to validate an email in eachone of the inputs since is a repeater; so somewhere I have to reprocess the repeater to handle validation? |
you validate your input data as usual, in the controller method which receives the input of your form. |
i have to add fields validation message in my repeater template. So the message container attribute must be improved at the same time as the corresponding inputs
This is the
<span>
attributedata-validate-for
(very important as it receives the error message with ajax if the field is not correctly filled)is it possible using repeater library to update this attribute or i need to add jquery developpment somewhere (library hack or out of the box ?)
below the html source code
expected values after user adding item
thanks by advance
The text was updated successfully, but these errors were encountered: