Skip to content

Instantly share code, notes, and snippets.

@tag1216
Created December 17, 2014 06:03
Show Gist options
  • Save tag1216/cac9f6c339d461d498d1 to your computer and use it in GitHub Desktop.
Save tag1216/cac9f6c339d461d498d1 to your computer and use it in GitHub Desktop.
Ascii文字制約
/**
* Ascii文字制約
*/
@Documented
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {})
@Pattern(regexp = "[\\x00-\\x7F]*")
public @interface Ascii {
String message() default "dv3j.core.validation.Ascii.message";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment