Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Samuel Dudík
PA165 Winery Management System
Commits
19889b8b
Commit
19889b8b
authored
May 18, 2022
by
xkorenk
Browse files
fixes
parent
e6720ecf
Pipeline
#141176
passed with stages
in 2 minutes and 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
winery/webapp/src/main/java/cz/muni/fi/pa165/winery/webapp/models/grape/GrapeUpsertViewModel.java
View file @
19889b8b
...
...
@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
org.modelmapper.ModelMapper
;
import
javax.validation.constraints.Not
Null
;
import
javax.validation.constraints.Not
Blank
;
/**
* @author Jakub Balga
...
...
@@ -29,7 +29,7 @@ public class GrapeUpsertViewModel extends ViewModelBase {
/**
* name of grape variety
*/
@Not
Null
(
message
=
"Cannot be empty"
)
@Not
Blank
(
message
=
"Cannot be empty"
)
private
String
name
;
public
GrapeDto
toDto
()
{
...
...
winery/webapp/src/main/java/cz/muni/fi/pa165/winery/webapp/models/wineBottle/WineBottleUpsertViewModel.java
View file @
19889b8b
...
...
@@ -9,9 +9,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
org.modelmapper.ModelMapper
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.PositiveOrZero
;
import
javax.validation.constraints.*
;
import
java.math.BigDecimal
;
import
java.util.List
;
...
...
@@ -36,7 +34,8 @@ public class WineBottleUpsertViewModel extends ViewModelBase {
/**
* name of wine bottle
*/
@NotNull
(
message
=
"Cannot be empty"
)
@NotBlank
(
message
=
"Cannot be empty"
)
@Pattern
(
regexp
=
"^[\\w0-9 ]+$"
,
message
=
"Please enter only alphanumerical characters and spaces"
)
private
String
name
;
/**
...
...
winery/webapp/src/main/java/cz/muni/fi/pa165/winery/webapp/models/wineType/WineTypeUpsertViewModel.java
View file @
19889b8b
...
...
@@ -9,7 +9,9 @@ import lombok.Setter;
import
org.modelmapper.ModelMapper
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.util.List
;
/**
...
...
@@ -32,7 +34,8 @@ public class WineTypeUpsertViewModel extends ViewModelBase {
/**
* name of wine type
*/
@NotNull
(
message
=
"Cannot be empty"
)
@NotBlank
(
message
=
"Cannot be empty"
)
@Pattern
(
regexp
=
"^[\\w0-9 ]+$"
,
message
=
"Please enter only alphanumerical characters and spaces"
)
private
String
name
;
/**
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment