i need validation address can have numbers, alphabets, space in 2 words should able .. no space in beginning of address. symbol should #
ex: #55 bernahrd gym
address:<input type="text" required="required" name="baguio_add"><br>
you can use regular expressions this: /[a-z0-9\s\#]+/i
instead of testing spaces @ start, use trim
(or ltrim
).
edit: changed tag javascript, can still use regular expressions using regex above.
Comments
Post a Comment