Re: Re: Validate Value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can you pls tell me how to add space in name ?
 
Regards,
Rinku

Tim Van Wassenhove <euki@xxxxx> wrote:
In article <20040711064659.27961.qmail@xxxxxxxxxxxxxxxxxxxxxxx>, Rinku wrote:
> --0-775821546-1089528419=:27331
> Content-Type: text/plain; charset=us-ascii
> 
> Pls guide on following.
> 1) I want to validate name for a alphabetic value, But if I give space between 2 words then its not supporting..

That's correct behaviour. The alphabet doesn't know what a space is ;)
Thus append the other allowed characters to your a-zA-Z interval.

> 2)I want to validate a phone no for 10 digits. But in this value if I enter "+" or "-" in begining then even 
> the system will accept it. So can you pls suggest me what to do to solve the problem ?

In this case you only want to allow characters in the interval 0-9. I
think \d is a shortcut for that. And to limit it to only 10 occurences,
i believe you can use {0,10} so you end up with \d{0,10} if i'm not
mistaken (consult a regular expressions manual to be sure)



-- 
Tim Van Wassenhove 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux