I have a validator and it fills in both password containers with the has-error tag correctly. But how to get rid of one of the two error messages produced by the errors.rejectValue()?
password blank: true, nullable: true, validator: { password, obj, errors ->
if (obj.password2 != password){
errors.rejectValue('password', 'invalid.matchingpasswords')
errors.rejectValue('password2', 'invalid.matchingpasswords')
return false
}
}
An other possibility would be, to tell spring to put an has-error tag into the second password container.