Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spring-petclinic-microservices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastien Briot
spring-petclinic-microservices
Commits
72dc0c88
Commit
72dc0c88
authored
9 years ago
by
michaelisvy
Browse files
Options
Downloads
Plain Diff
Merge pull request #48 from 7footmoustache/patch-1
Fixed some typos in comments
parents
83301cb6
de73bdce
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/springframework/samples/petclinic/web/PetValidator.java
+3
-3
3 additions, 3 deletions
...g/springframework/samples/petclinic/web/PetValidator.java
with
3 additions
and
3 deletions
src/main/java/org/springframework/samples/petclinic/web/PetValidator.java
+
3
−
3
View file @
72dc0c88
...
...
@@ -29,19 +29,19 @@ public class PetValidator {
public
void
validate
(
Pet
pet
,
Errors
errors
)
{
String
name
=
pet
.
getName
();
// name valida
a
tion
// name validation
if
(!
StringUtils
.
hasLength
(
name
))
{
errors
.
rejectValue
(
"name"
,
"required"
,
"required"
);
}
else
if
(
pet
.
isNew
()
&&
pet
.
getOwner
().
getPet
(
name
,
true
)
!=
null
)
{
errors
.
rejectValue
(
"name"
,
"duplicate"
,
"already exists"
);
}
// type vali
c
ation
// type vali
d
ation
if
(
pet
.
isNew
()
&&
pet
.
getType
()
==
null
)
{
errors
.
rejectValue
(
"type"
,
"required"
,
"required"
);
}
// typ
e vali
c
ation
// birth dat
e vali
d
ation
if
(
pet
.
getBirthDate
()==
null
)
{
errors
.
rejectValue
(
"birthDate"
,
"required"
,
"required"
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment