I am creating a form, with warning elements. All works great but need to define my patterns better.
$("#postcode").inputNotes(
{
warning: {
pattern: /^[0-9]+$/,
type: 'note',
text: 'Only numbers, please ...',
inversedBehavior: true
}
}
);
$("#phone").inputNotes(
{
warning: {
pattern: /^[0-9]+$/,
type: 'note',
text: 'Only numbers, no spaces please ...',
inversedBehavior: true
}
}
);
Ok for the Postcode warning, I want the pattern to expect 4 numbers
For the Phone warning, I want the pattern to expect 10 numbers.
Any help appreciated.