0

我需要使用 Spry 验证 PHP 表单,下面是我使用的 javascript。验证规则是:9 位数字后跟文字“v”。验证有效,但输入某些数字时重复。

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

如果有人帮我解决这个问题。

4

1 回答 1

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.

于 2012-10-17T07:41:08.953 回答