mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Commenting and Capitalization
This commit is contained in:
parent
c8f4706582
commit
eb611d72bc
2 changed files with 4 additions and 3 deletions
|
@ -44,15 +44,16 @@ public class KidValidator implements Validator {
|
|||
errors.rejectValue("name", REQUIRED, REQUIRED);
|
||||
}
|
||||
|
||||
// allergies validation
|
||||
if (!StringUtils.hasLength(allergies)) {
|
||||
errors.rejectValue("allergies", REQUIRED, REQUIRED);
|
||||
}
|
||||
|
||||
// medications validation
|
||||
if (!StringUtils.hasLength(medications)) {
|
||||
errors.rejectValue("medications", REQUIRED, REQUIRED);
|
||||
}
|
||||
|
||||
// gender validation
|
||||
if (kid.isNew() && kid.getGender() == null) {
|
||||
errors.rejectValue("gender", REQUIRED, REQUIRED);
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ INSERT INTO doctor_specialties VALUES (3, 3);
|
|||
INSERT INTO doctor_specialties VALUES (4, 2);
|
||||
INSERT INTO doctor_specialties VALUES (5, 1);
|
||||
|
||||
INSERT INTO gender VALUES (1, 'male');
|
||||
INSERT INTO gender VALUES (2, 'female');
|
||||
INSERT INTO gender VALUES (1, 'Male');
|
||||
INSERT INTO gender VALUES (2, 'Female');
|
||||
|
||||
|
||||
INSERT INTO parents VALUES (1, 'George', 'Franklin', '110 W. Liberty St.', 'Madison', '6085551023');
|
||||
|
|
Loading…
Reference in a new issue