Commit 19889b8b authored by xkorenk's avatar xkorenk
Browse files

fixes

parent e6720ecf
Pipeline #141176 passed with stages
in 2 minutes and 30 seconds
......@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
import org.modelmapper.ModelMapper;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
/**
* @author Jakub Balga
......@@ -29,7 +29,7 @@ public class GrapeUpsertViewModel extends ViewModelBase {
/**
* name of grape variety
*/
@NotNull(message = "Cannot be empty")
@NotBlank(message = "Cannot be empty")
private String name;
public GrapeDto toDto() {
......
......@@ -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;
/**
......
......@@ -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;
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment