001package model.validation; 002 003import javax.validation.Constraint; 004import javax.validation.Payload; 005import javax.validation.constraints.Size; 006import java.lang.annotation.*; 007 008/** 009 * La password deve avere un formato valido 010 */ 011@Size(min=3, max=255) 012@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, 013 ElementType.ANNOTATION_TYPE}) 014@Retention(RetentionPolicy.RUNTIME) 015@Constraint(validatedBy = {}) 016@Documented 017public @interface PasswordFormat { 018 String message() default "Formato password non valido"; 019 020 Class<?>[] groups() default {}; 021 022 Class<? extends Payload>[] payload() default {}; 023}