Mini Project: Hotel Booking Validation: Groups, Custom Rules and Error Codes
Learn Mini Project: Hotel Booking Validation: Groups, Custom Rules and Error Codes (Validation, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Mini Real-Time Project: Hotel Booking Validation: Groups, Custom Rules and Error Codes Problem A booking form has rules that differ between creating and updating a booking, a rule that compares two fields, and error messages that must come from message codes so they can be translated. Requirements Use validation groups so the id is required only on update. Write a custom Validator that checks check-out is after check-in. Show the error code list Spring builds for each error. Validate simple request parameters directly. Concepts Used @Validated groups Validator interface (cross-field rule)...