Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Important Bean Validation annotations

Pragya Keshap answered on February 24, 2023 Popularity 2/10 Helpfulness 1/10

Contents


More Related Answers

  • required a bean of typ
  • bean in spring
  • @bean annotation in spring boot
  • Spring Boot annotations
  • @Bean java spring
  • bean in spring
  • set bean properties
  • JSR-303 Bean Validation Annotations Support
  • Configuring a bean's metadata using annotations
  • Annotation and beans
  • Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:'prePersist'. Please refer to embedded ConstraintViolations for details

  • Important Bean Validation annotations

    0

    •@NotNull validates that the annotated property value is not null.

    •@Size validates that the annotated property value has a size between the attributes

    min and max; can be applied to String, Collection, Map, and array properties.

    •@Min validates that the annotated property has a value no smaller than the value

    attribute.

    •@Max validates that the annotated property has a value no larger than the value

    attribute.

    •@Email validates that the annotated property is a valid email address.

    •@NotEmpty validates that the property is not null or empty; can be applied to String,

    Collection, Map or Array values.

    •@NotBlank can be applied only to text values and validates that the property is not

    null or whitespace. 

    Popularity 2/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 24 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.