0

I need to validate PHP form using Spry and below is the javascript I used. The validation rule is: 9 digits followed by a literal 'v'. Validation works, but when entering some numbers are duplicated.

var id_num1 = new Spry.Widget.ValidationTextField(
    "id_num1",
    "custom",
    {
        pattern: "000000000v",
        useCharacterMasking: true,
        validateOn: ["blur"],
        isRequired:true
    });

If anyone help me to solve this issue.

J. Steen
  • 15,470
  • 15
  • 56
  • 63
DEVEX
  • 137
  • 11

1 Answers1

1

Try:

var id_num1 = new Spry.Widget.ValidationTextField(
    "id_num1",
    "custom",
    {
        format:"custom",
        pattern: "000000000v",
        useCharacterMasking:true,
        validateOn:["blur"], 
        isRequired:true
    });

And if it doesn't work, please be more precise in what is happening.

Jon
  • 4,746
  • 2
  • 24
  • 37