posted 6 years ago
I have this custom message in my ValidationMessage.properties ->
missing.startDate= startDate is a required field.
I have this on my request
@NotNull(message="{missing.startDate}")
Now, this forces me to create a message for each field. If i could do something like this
In ValidationMessage.properties
missing = fieldName is a required field. OR
missing = {0} is a required field.
@NotNull(field="startDate") or just have it as @NotNull
@NotNull is for javax