phpretard Posted May 6, 2008 Share Posted May 6, 2008 I am trying to validate a street address. I have managed to accept only letters and number but my code won't allow for a space. if (!eregi ("^[[:alnum:]+]+$", $COStreet)){ $valid="NOPE"; } Any helpers? Link to comment https://forums.phpfreaks.com/topic/104403-space-validation/ Share on other sites More sharing options...
Rohan Shenoy Posted May 6, 2008 Share Posted May 6, 2008 if (!eregi ("^[a-zA-Z0-9 ]+$", $COStreet)){ $valid="NOPE"; } Link to comment https://forums.phpfreaks.com/topic/104403-space-validation/#findComment-534465 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.