Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Parsley 来验证注册表。客户现在要求强制用户使用至少一个大写字母、数字和特殊字符。我想知道是否可以通过使用 Parsley 创建自定义验证器来实现这一点,而不是实现额外的代码?
data-parsley-pattern="(?=.*[a-z])(?=.*[A-Z]).*"
data-parsley-pattern="[a-zA-Z0-9\pL\s\-]+$"
将您的特殊字符作为“\special_character”包含在方括号内