-
-
Notifications
You must be signed in to change notification settings - Fork 968
Closed
Milestone
Description
GrailsDomainClassValidator.java was refactored in grails 3 (and 2) and it seems that now there is an error in validate method:
In grails 1 validate method validates persistent properties first, and all properties except persistent after.
In grails 3 validate method validates all properties, and all properties except persistent after.
This results in calling validators on transient fields two times during object validation
Steps to Reproduce
- Create new domain class
- Add transient field to this class
- Add custom validator to this field
- Add some output (println) from custom validator
- Call validate method on object of this class
- Check the output
Expected Behaviour
Custom validator called one time for one validate call
Actual Behaviour
Custom validator called two times for one validate call
Example Application
Metadata
Metadata
Assignees
Labels
No labels