Reputation: 6774
i am using spring and hibernate validation, and i want to make a custom annotation that checks if a username already exists in the database or not, can anyone please provide me with examples for such thing ?
Upvotes: 1
Views: 8045
Reputation: 15086
Here is an example of what you want (the check if email exists in database)
http://nonrepeatable.blogspot.com/2010/05/creating-custom-jsr-303-constraint.html
Upvotes: 4