如何验证登录密码 [英] How to validate password for login

查看:122
本文介绍了如何验证登录密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个密码,该密码必须像这样的一个特殊字符和一个数字,
我该怎么做.

I want to create password which must have one special character one number like this,
How can I make it.

推荐答案

请检查以下内容:

(?=^.{8,}
Please check this out:

(?=^.{8,}


)
这部分意味着还有8个字符,并且匹配从输入的开头开始.

((?=.*\d)
均值包含一个数字.

|(?=.*\W+))
或包含非字母或数字的内容

(?![.\n])
不是以点或UNIX换行符开头.

(?=.*[A-Z])
至少包含一个大写字母.

(?=.*[a-z])
包含至少一个小写字母

.*
)
This part means has 8 more more characters, and the match starts at the start of input.

((?=.*\d)
Means contains a digit.

|(?=.*\W+))
Or contains something that is neither a letter or a digit

(?![.\n])
not starting with a dot or UNIX newline.

(?=.*[A-Z])
Contains at least one capital letter.

(?=.*[a-z])
Contains at least one lowercase letter

.*



完全由非换行符组成,并且匹配的组将包含整个字符串.

还要检查一些线程:
表单验证! [此处 [此处 [这里 [

Consists entirely of non-newline characters and the matched group will contain the entire string.

Also check some threads:
Form validating![^]
Here[^]
Here[^]
and Here[^]


这篇关于如何验证登录密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆