views:

43

answers:

2

hi, i have a doubt that 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.

A: 

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.

RageZ
Thank you Mr.RageZ for response good explanation
Surya sasidhar
A: 

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

rahul
Thank you Mr. adamantium for reference good explanation
Surya sasidhar