开发者

Livevalidation: only validate when default value is changed

I am validating my html form with livevalidation and everything works great except for one feature.

I have a input field with a default value age, I only开发者_如何学Go want the livevalidation to validate when it says something other than "age". so maybe the user will type in 20 then the validation will fire checking its things but if left as "age" it won't check it all. But as of now, it just checks everything with a validation script and this is a problem for me as I have lots of fields in my form and some of them are optional so when I hit submit, the livevalidation checks the age field as well even if the user didnt touch it to begin with. Would this be possible with livevalidation ?

Thanks for the help.


i think you can solve it by triggering 'change' on elements that have default values

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜