|
Posted by Tom Rogers on 10/29/74 11:13
Hi,
Thursday, April 14, 2005, 11:47:13 PM, you wrote:
BD> I wanted to create a regex that force a PHP form text field to meet the
BD> following requirements:
BD> a. Must contain an 1 uppercase letter. [A-Z]
BD> b. Must contain 1 digit. [0-9]
BD> c. Must be a minimum of 7 characters in length. {7}
BD> I'm not sure of how to build the correct syntax for using all 3
BD> requirements together.
BD> Any help?
BD> Thanks,
BD> Dave
BD> HTC Disclaimer: The information contained in this message
BD> may be privileged and confidential and protected from disclosure.
BD> If the reader of this message is not the intended recipient, or an
BD> employee or agent responsible for delivering this message to the
BD> intended recipient, you are hereby notified that any
BD> dissemination, distribution or copying of this communication is
BD> strictly prohibited. If you have received this communication in
BD> error, please notify us immediately by replying to the message and
BD> deleting it from your computer. Thank you.
easier done seperately I think
if(
strlen($text) > 6 &&
preg_match('/\d+/',$text) &&
preg_match('/[A-Z]+/',$text)
) { echo 'OK <br>';
--
regards,
Tom
Navigation:
[Reply to this message]
|