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.
嗨,我如何阻止用户电子邮件扩展名进行注册?例如,我不希望用户使用此电子邮件扩展名进行注册@example.com。magento 中是否有默认方法来完成此操作?
@example.com
您可以使用正则表达式添加一个新类来验证客户输入的 example.com 域。
只需像这样将它添加到您的validation.js
/@example.com\s*$/.test(mystring) is true if the string ends in @example.com (plus optional whitespace).
希望这对你有帮助。
我有一个带有输入字段和保存按钮的 jsf 表单,如下面的代码所示。我想要实现的是,当单击保存按钮时,应使用正则表达式模式验证输入。如果验证失败,则不应显示保存确认对话框。否则会显示保存确认对话框,让用户选择是否保存。
在下面的代码中,尽管有条件 onclick="if(#{conditionOK}),但始终显示对话框。我不希望显示确认对