Skip to content

Instantly share code, notes, and snippets.

@mak9456
Created September 23, 2018 18:33
Show Gist options
  • Save mak9456/5a4fdf77315d416eaf67605d33238091 to your computer and use it in GitHub Desktop.
Save mak9456/5a4fdf77315d416eaf67605d33238091 to your computer and use it in GitHub Desktop.
model student
package com.src.spring.mvc.model;
import java.security.KeyStore.PrivateKeyEntry;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
public class Student{
 private String Id;
 private String firstName;
 
 @NotNull(message="is required")
 @Size(min=1,message="is required")
 private String lastName; // validation done to check if lastname is NULL
 
 @Max(value=10,message="Value should between 0 and 10")
 @Min(value=0,message="Value should between 0 and 10")
 private String standard;
 private String Age;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment