I use jquery validator plugin to validate my form. In form exists currency field, which needs the value, that appropriate to this regexp ^\d{1,9}(\.\d{1,2})?$. Below is my js code snippet.
$("#myForm").validate({
ignore:[],
rules:{
currency:{
required: true
}
.....
}
}
Question: How can I set above mentioned regexp to currency field with jquery ?
You could define a custom rule:
and then: