Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
broken-petclinic
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Smart
broken-petclinic
Commits
de73bdce
Commit
de73bdce
authored
10 years ago
by
Craig Dennis
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some typos in comments
parent
9f6814d7
No related branches found
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 @
de73bdce
...
...
@@ -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