package example.controllers.forms;

import example.controllers.forms.validators.EqualsPropertyValues;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

@Data
@NoArgsConstructor
@EqualsPropertyValues(property = "password", comparingProperty = "passwordConfirmation")
public class UserForm implements Serializable {

    public static final long serialVersionUID = 1L;

    @Length(min=1, max=50)
    private String name;

    @Length(min=6, max=255)
    @Email
    private String email;

    @Length(min=6, max=255)
    private String password;

    @Length(min=6, max=255)
    private String passwordConfirmation;
}

@@ -245,16 +245,60 @@
 nts.
-Length;%0A
+NotBlank;%0A%0Aimport javax.validation.constraints.Size;
 %0Aimp
@@ -549,22 +549,27 @@
    @
-Length(min=1, 
+NotBlank%0A    @Size(
 max=
@@ -599,38 +599,43 @@
 name;%0A%0A    @
-Length(min=6, 
+NotBlank%0A    @Size(
 max=255)%0A   
@@ -666,38 +666,36 @@
 ng email;%0A%0A    @
-Length
+Size
 (min=6, max=255)
@@ -734,14 +734,12 @@
    @
-Length
+Size
 (min

modify user form validations