I want to validate some fields of a form, by axis: the text field that has the following mask: 000-0000000-0
I want to validate some fields of a form, by axis: the text field that has the following mask: 000-0000000-0
You can use jQuery-Mask-Plugin and do something like
$(function() {
$("#id_campo").mask('000-0000000-0', {reverse: true});
}
Here you can see how to work with JQuery in laravel.
Hello, how easy is it to occupy a pattern in the input in this way?
I put it that way why I imagine you want numbers between 0 and 9.
<input type="text" pattern="^[0-9]{3}[\-][0-9]{7}[\-][0-9]{1}" title="000-0000000-0">
Of wanting only numbers 0 would be like this:
<input type="text" pattern="^[0]{3}[\-][0]{7}[\-][0]{1}" title="000-0000000-0">
Greetings, tell me how it went!