lib/volt/models/validations/validations.rb in volt-0.9.4 vs lib/volt/models/validations/validations.rb in volt-0.9.5.pre1

- old
+ new

@@ -125,10 +125,14 @@ # TODO: Errors is being called for any validation change. We should have errors return a # hash like object that only calls the validation for each one. def validate! errors.clear - run_validations.then do + # Run the before_validate callbacks + run_callbacks(:before_validate).then do + # Run the actual validations + run_validations + end.then do # See if any server errors are in place and merge them in if they are errors.merge!(server_errors.to_h) if Volt.client? end.then do run_custom_validations end.then do