Hi,
I have a regular expression that is searched on a field coming from a form....
It basically returns true or false and looks for ONLY numbers.. ie: It validates that the entry is only numbers, and nothing else.
I need it changing so that it will allow a period (.) and a minus (-)
here's what I have at the mo
string.search(/[^\d\s]/)
how do I make it so that only numbers, a full stop and a minus can be entered??
thanks for any help
I have a regular expression that is searched on a field coming from a form....
It basically returns true or false and looks for ONLY numbers.. ie: It validates that the entry is only numbers, and nothing else.
I need it changing so that it will allow a period (.) and a minus (-)
here's what I have at the mo
string.search(/[^\d\s]/)
how do I make it so that only numbers, a full stop and a minus can be entered??
thanks for any help

Comment