Skip to main content
added 3 characters in body
Source Link
user442884
user442884

According to spring framework documentation, section Java Bean Validation:

The Spring Framework provides support for the Java Bean Validation API.

 

How can one avoid writing the validation rules for each DTO created?

For each bean to be validated develop a corresponding validator by implementing the Validator interface, included in the Spring library in use, and for the common validations develop a class and in each validator requiring common validations add a field of type of the common validations class.

All that although I have the feeling this question is more appropriate for SO community.

According to spring framework documentation, section Java Bean Validation:

The Spring Framework provides support for the Java Bean Validation API.

 

How can one avoid writing the validation rules for each DTO created?

For each bean to be validated develop a corresponding validator by implementing the Validator interface, included in the Spring library in use, and for the common validations develop a class and in each validator requiring common validations add a field of type of the common validations class.

All that although I have the feeling this question more appropriate for SO community.

According to spring framework documentation, section Java Bean Validation:

The Spring Framework provides support for the Java Bean Validation API.

 

How can one avoid writing the validation rules for each DTO created?

For each bean to be validated develop a corresponding validator by implementing the Validator interface, included in the Spring library in use, and for the common validations develop a class and in each validator requiring common validations add a field of type of the common validations class.

All that although I have the feeling this question is more appropriate for SO community.

Source Link
user442884
user442884

According to spring framework documentation, section Java Bean Validation:

The Spring Framework provides support for the Java Bean Validation API.

 

How can one avoid writing the validation rules for each DTO created?

For each bean to be validated develop a corresponding validator by implementing the Validator interface, included in the Spring library in use, and for the common validations develop a class and in each validator requiring common validations add a field of type of the common validations class.

All that although I have the feeling this question more appropriate for SO community.