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.
有谁知道如何在不创建自定义验证器的情况下验证两个实体属性的复合唯一性?
您可以将几个字段传递给注释:
@UniqueEntity(fields={"firstField", "secondField"})
我有一个带有输入字段和保存按钮的 jsf 表单,如下面的代码所示。我想要实现的是,当单击保存按钮时,应使用正则表达式模式验证输入。如果验证失败,则不应显示保存确认对话框。否则会显示保存确认对话框,让用户选择是否保存。
在下面的代码中,尽管有条件 onclick="if(#{conditionOK}),但始终显示对话框。我不希望显示确认对