CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [TIP] Validate Password to have at least one number

Print topic Send  topic

Author Message
ckroon

Posts: 869
Posted: 08/21/2007, 10:14 PM


So... I see that in the input validation box you can set it to check for a valid email:

^[\w\.-]{1,}\@([\da-zA-Z-]{1,}\.){1,}[\da-zA-Z-]+$

or a zipcode: ^\d{5}$

I am trying to figure these darned codes out! How do I set it to check that there is at least one digit in the password?

Also, do I check for length here (6 charas min) or can I set that up with a Valdiate event, separate from this one?

Thanks.

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
ReneS

Posts: 225
Posted: 08/22/2007, 1:02 AM

Hi,

Think that there is an explanation here: http://www.regular-expressions.info/

Good luck,

Rene
View profile  Send private message
ckroon

Posts: 869
Posted: 08/22/2007, 8:26 PM

Ok..Here it is.. paste this into the Input validation field:


^\w*(?=\w*\d)(?=\w*[a-z])\w*$

This validates an email to have at least 1 number and letter. Use the regular Server On Validation event to validate minimum length.


While I'm at it: here it is for Login: makes sure it's not just a bunch of spaces...

/^[A-Za-z0-9_]*$/

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.