I am using Spring MVC and Spring Security and hibernate. i am having problem with save 'Password" can not tell where mistake is
I get the Following Error When i submit my form
nested exception is javax.validation.ConstraintViolationException: Validation failed for classes [com.greensungh.jupiter_SHM.model.UsersInfo] during persist time for groups [javax.validation.groups.Default, ]
List of constraint violations:[
ConstraintViolationImpl{interpolatedMessage='size must be between 6 and 25', propertyPath=Password, rootBeanClass=class com.greensungh.jupiter_SHM.model.UsersInfo, messageTemplate='{javax.validation.constraints.Size.message}'}
]] with root cause
javax.validation.ConstraintViolationException: Validation failed for classes [com.greensungh.jupiter_SHM.model.UsersInfo] during persist time for groups [javax.validation.groups.Default, ]
List of constraint violations:[
ConstraintViolationImpl{interpolatedMessage='size must be between 6 and 25', propertyPath=Password, rootBeanClass=class com.greensungh.jupiter_SHM.model.UsersInfo, messageTemplate='{javax.validation.constraints.Size.message}'}
this is my view:
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
<form:password path="Password" id="password"
class="form-control span8" />
<div class="has-error">
<form:errors path="Password" class="help-inline" />
</div></div></div>
The Model:
@NotEmpty
@Size(min=6, max=25)
@Column(name="PASSWORD", nullable=false)
private String Password;
my messages.properties
NotEmpty.userInfo.Password=Password must be blank
Size.userInfo.Password=Password must be between {6} to {25} characters long
any ideas