[hibernate-issues] [Hibernate-JIRA] Commented: (HV-70) Add @Equals(property="name")

Hardy Ferentschik (JIRA) noreply at atlassian.com
Mon Nov 8 06:13:13 EST 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39061#action_39061 ] 

Hardy Ferentschik commented on HV-70:
-------------------------------------

This is an issue created against the obsolete 3.x code base of Validator. As a matter of fact Hibernate Validator 4.1.x has a {{@ScriptAssert}} annotation where the usecase can be solved via:
{code}
@ScriptAssert(lang = "javascript", script = "_this.passVerify.equals(_this.pass)")
public class MyBean {
  @Size(min=6, max=50)
  private String pass;

  private String passVerify;
}
{code}


> Add @Equals(property="name")
> ----------------------------
>
>                 Key: HV-70
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-70
>             Project: Hibernate Validator
>          Issue Type: New Feature
>          Components: legacy
>    Affects Versions: 3.1.0.CR2
>            Reporter: Juergen Zimmermann
>             Fix For: 3.2.0
>
>
> It would be nice to have something like:
> public class Customer implements Serializable {
> 	private String password;
> 	@Equals(property="password")  // the name of the property above
> 	private String password2;
> 	...
> }
> Such entity classes would be helpful for user interfaces e.g. inside registration pages where you want to avoid typos or ensure that a human being is registering. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list