package spring.jsp;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @Created 08 / 04 / 2020 - 11:35 AM
 * @project SpringJSP
 * @Author Hamdamboy
 */
public class PersonForm {

    @NotNull
    @Size(min=2, max = 30)
    private String name;

    @NotNull
    @Min(18)
    private Integer age;

    public String getName(){
        return this.name = name;
    }

    public void setName(String name){
        this.name = name;
    }

    public Integer getAge(){
        return age;
    }

    public void setAge(Integer age){
        this.age =age;
    }

    public String toString(){
        return "Person (Name: " + this.name + ", Age: " + this.age + ")";
    }


}
