mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-16 04:35:49 +00:00
Merge pull request #2 from BH-YU/add-log-code-smell
Update PetValidator.java
This commit is contained in:
commit
9d0db03264
1 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,13 @@ public class PetValidator implements Validator {
|
|||
public void validate(Object obj, Errors errors) {
|
||||
Pet pet = (Pet) obj;
|
||||
String name = pet.getName();
|
||||
System.out.println("########################");
|
||||
System.out.println("########################");
|
||||
System.out.println("########################");
|
||||
System.out.println("########################");
|
||||
System.out.println("########################");
|
||||
System.out.println("########################");
|
||||
System.out.println("########################");
|
||||
// name validation
|
||||
if (!StringUtils.hasText(name)) {
|
||||
errors.rejectValue("name", REQUIRED, REQUIRED);
|
||||
|
|
Loading…
Reference in a new issue