如何使用以下验证创建登录页面 [英] how to create a login page with following validations
本文介绍了如何使用以下验证创建登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i需要一个邮件ID的代码,包含至少6个字符,没有空格,密码长度为6到8个字符,密码包含一个特殊的字符和至少一个数字并且至少一封大写字母。请给我答复
解决方案
为此使用以下RegExp,
((?=。* \d)(?=。* [AZ])(?=。* [AZ])(?=。* [@#
%])。{6,20} )
Quote:
(#Start of组
(?=。* \ d)#必须包含0-9之间的一位数
(?=。* [az])#必须包含一个小写字符
(?=。* [AZ])#必须包含一个大写字符
(?=。* [@#
%])#必须在列表@#中包含一个特殊符号
hi,
i need a code for mail id shoud contain atleast 6 chareters and no empty spaces, and password length shud be 6 to 8 charecters and password contain one special charecter and atleast one digit and atleast one capital letter. please give me reply with answer解决方案Use the following RegExp for this,
((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#
%]).{6,20})
Quote:
( # Start of group
(?=.*\d) # must contains one digit from 0-9
(?=.*[a-z]) # must contains one lowercase characters
(?=.*[A-Z]) # must contains one uppercase characters
(?=.*[@#
%]) # must contains one special symbols in the list "@#
这篇关于如何使用以下验证创建登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文