-
Notifications
You must be signed in to change notification settings - Fork 98
Enable server-side validation #7
Copy link
Copy link
Open
Labels
Description
Validation on server side has been removed in the Angular version.
PetValidator is disabled. You may save a pet with an empty name despite the @SiZe(min = 1) String name on PetRequest inner class. You may do a test :
curl -H "Content-Type: application/json" -X PUT -d '{"id":1,"name":"","birthDate":"2010-09-07","typeId":"1"}' http://localhost:8080/api/customer/owners/1/pets/1
More over, duplicate names are not handled.
Check the Spring Petclinic ReactJS version. Errors are correctly handled: https://github.com/spring-petclinic/spring-petclinic-reactjs
See classes: InvalidRequestException, ApiExceptionHandler, ErrorResource, FieldErrorResource
Reactions are currently unavailable