remove deprecated validations

This commit is contained in:
Felix Förtsch
2018-09-05 09:41:07 +02:00
parent 76a07b2f5a
commit af1cdad171
2 changed files with 4 additions and 5 deletions

View File

@@ -36,10 +36,10 @@ public class Contact implements Serializable {
@Email(regexp = "^.*@.*\\..*")
private String email;
@javax.validation.constraints.NotBlank
@NotBlank
private String firstName;
@javax.validation.constraints.NotBlank
@NotBlank
private String lastName;
@DateTimeFormat
@@ -51,7 +51,7 @@ public class Contact implements Serializable {
@Digits(integer = 16, fraction = 0)
private String phone;
//@javax.validation.constraints.NotBlank
//@NotBlank
@OneToOne
private Address address;

View File

@@ -7,7 +7,6 @@ import lombok.Data;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import javax.persistence.*;
import javax.validation.constraints.*;
@@ -38,7 +37,7 @@ public class User {
//The regex ensures that only emails with top level domains are accepted (note that local email addresses are actually valid but of little use to us)
@Email(regexp="^.*@.*\\..*")
@javax.validation.constraints.NotBlank
@NotBlank
private String username;
@Length(min=4, max=256)