A mandatory, required input field (fields that the user must enter).
With mandatory fields the validators work (because an empty @Digit field would be wrong, so it should be validated), but with optional fields @Digit validates the empty field and displays an error, that it is no valid digit (but it is valid, because it is empty).
What I miss is something like @Digit(..., allowEmpty = true) - which should be the default because a mandatory/required field will have a @NotEmpty or @NotNull...
Am I blind?
|