vue-strap icon indicating copy to clipboard operation
vue-strap copied to clipboard

add name to :pattern for validation of Input component

Open kife-design opened this issue 6 years ago • 0 comments

I have a big form that is being validated on the server side. If the validation fails, then it will return all the errors that have occured.

So i want use a function as the :pattern method and want to check if the current field is in the errors. However, only the value is being passed to the function, so if i have to define a separate validation function for every input in the form. It would be handy is the name of the input would also be passed to the :pattern method so we can use one function to validate various fields.

kife-design avatar Jul 21 '17 08:07 kife-design