简体   繁体   English

如何确定验证约束的优先级

[英]How to prioritize the validation constraints

I have an email field that has both required attribute and type=email. 我有一个同时具有必填属性和type = email的电子邮件字段。 It shows two error messages at a time. 它一次显示两个错误消息。 How to restrict to only one error message at a time. 如何一次只限制一个错误消息。 How do I set the priority between 'required' and type="email". 如何在“ required”和type =“ email”之间设置优先级。

By default, Parsley prioritize itself the various constraints applied to a field, and shows only the most important error message first. 默认情况下,Parsley会优先考虑应用于字段的各种约束,并仅首先显示最重要的错误消息。

Please, ensure: 请确保:

Best 最好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM