开发者

javascript and regularexpression?

开发者 https://www.devze.com 2022-12-11 03:11 出处:网络
i have a doubt t开发者_JAVA技巧hat whether javascript expression is better or regularexpression is better.

i have a doubt t开发者_JAVA技巧hat whether javascript expression is better or regularexpression is better. i mean for validation javascript is best or ?How it is different form each other? thank you.


It depends on the kind of validation that you need.

Suppose if you need to compare two dates then regex won't be enough.

This one is a nice read

12 Reasons to Learn and Use Regular Expressions


Surya,

Javascript can help you to build some validation but you should madder what implement the same input validation on the server side.

So it's only to make it more user friendly, so you should start implementing your server input validation when you are done and if you have time add the javascript validation.

0

精彩评论

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