close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

password validations

Thread began 12/22/2016 8:57 am by Jamie | Last modified 12/24/2016 5:30 pm by Ray Borduin | 1511 views | 7 replies |

Jamie

password validations

Hey Ray

How would I adjust/add a server validation for a password so that you have to have 1 digit, 1 special char etc?

$WAFV_Errors .= WAValidateLE(((isset($_POST["Confirm"]))?$_POST["Confirm"]:"") . "",((isset($_POST["Password"]))?$_POST["Password"]:"") . "",false,7);
$WAFV_Errors .= WAValidateEL(((isset($_POST["Confirm"]))?$_POST["Confirm"]:"") . "",6,0,true,8);
Sign in to reply to this post

Ray BorduinWebAssist

You wouldn't edit this. You would add additional validations. This is the Like Entry validation.

You would add Regular Expression validation the the password field for the additional validation requirement:

Some regex values you might use are:

Minimum 8 characters at least 1 Alphabet and 1 Number:
/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/

Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character:
/^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$/

Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number:
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$/
or
/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/

Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}/

Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}/

I just found these on the web so I haven't tested them, but people seem to have had success with them.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

thanks for those.

have tried the first one you listed:

$WAFV_Errors .= WAValidateLE(((isset($_POST["Confirm"]))?$_POST["Confirm"]:"") . "",^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/ . "",true,9);

and DW shows a syntax error and the live page is blank

Sign in to reply to this post

Ray BorduinWebAssist

It appears you entered the wrong value. It should have been:

$WAFV_Errors .= WAValidateRX(((isset($_POST["Confirm"]))?$_POST["Confirm"]:"") . "/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/" . "",true,9);
Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

I had tried that as well but it also shows as an error in DW and blank live page

Sign in to reply to this post

Ray BorduinWebAssist

My code example was missing a quote at the end. I've updated it. Please try again.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

thanks. it doesnt error now but it doesnt trigger either and doesnt force the requirement

Sign in to reply to this post

Ray BorduinWebAssist

I'm sorry I missed this earlier. This still has "Like Entry" validation. You should have selected "Regular Expression" validation and then entered the expression to validate against:

/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...