Skip to content

Enable server-side validation #7

@arey

Description

@arey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions