Commit 8e3d0293 authored by Jakub Balga's avatar Jakub Balga
Browse files

unwanted validation removed

parent cd691553
...@@ -18,10 +18,9 @@ import java.math.BigDecimal; ...@@ -18,10 +18,9 @@ import java.math.BigDecimal;
public class WineBottleDto extends PersistentDtoBase { public class WineBottleDto extends PersistentDtoBase {
/** /**
* name of the bottle, allows only alphanumerical characters * name of the bottle
*/ */
@NotBlank @NotBlank
@Pattern(regexp = "^[\\w0-9 ]+$", message = "Only alphanumerical characters and spaces")
private String name; private String name;
/** /**
......
...@@ -5,7 +5,6 @@ import lombok.*; ...@@ -5,7 +5,6 @@ import lombok.*;
import lombok.experimental.SuperBuilder; import lombok.experimental.SuperBuilder;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
/** /**
* @author Jakub Balga * @author Jakub Balga
...@@ -18,10 +17,9 @@ import javax.validation.constraints.Pattern; ...@@ -18,10 +17,9 @@ import javax.validation.constraints.Pattern;
public class WineTypeDto extends PersistentDtoBase { public class WineTypeDto extends PersistentDtoBase {
/** /**
* Name of the wine, allows only alphanumerical characters * Name of the wine
*/ */
@NotBlank @NotBlank
@Pattern(regexp = "^[\\w0-9 ]+$", message = "Only alphanumerical characters and spaces")
private String name; private String name;
/** /**
......
...@@ -27,11 +27,9 @@ public class WineBottle extends EntityBase{ ...@@ -27,11 +27,9 @@ public class WineBottle extends EntityBase{
/** /**
* attribute of type String representing name, * attribute of type String representing name,
* allows only alphanumerical characters
*/ */
@Column(nullable = false) @Column(nullable = false)
@NotNull @NotBlank
@Pattern(regexp = "^[\\w0-9 ]*$", message = "Only alphanumerical characters")
private String name; private String name;
/** /**
......
...@@ -11,7 +11,6 @@ import org.modelmapper.ModelMapper; ...@@ -11,7 +11,6 @@ import org.modelmapper.ModelMapper;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.PositiveOrZero; import javax.validation.constraints.PositiveOrZero;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
...@@ -38,7 +37,6 @@ public class WineBottleUpsertViewModel extends ViewModelBase { ...@@ -38,7 +37,6 @@ public class WineBottleUpsertViewModel extends ViewModelBase {
* name of wine bottle * name of wine bottle
*/ */
@NotNull(message = "Cannot be empty") @NotNull(message = "Cannot be empty")
@Pattern(regexp = "^[\\w0-9 ]*$", message = "Only alphanumerical characters")
private String name; 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