2010-06-29 89 views

回答

5

發現它在

.../JS /樣機/ validation.js

還有的條件和與其對應的錯誤消息的列表。

0

可以使用this.error =「自定義消息」

['validate-zip-extra', 'Please enter a valid zip code', function (v) { 
     v = v.trim(); 
     this.error = "custom validation error extra"; 
     var regexpString = /^[0-9][0-9][0-9][1-9](\s)?([a-z]{2})$/i; 
     return Validation.get('IsEmpty').test(v) || regexpString.test(v); 
    } else { 
     return true; 
    } 
}], 
上你的驗證函數內部的動態更改錯誤信息