Skip to content

Commit

Permalink
Add @phone
Browse files Browse the repository at this point in the history
  • Loading branch information
linux-china committed Sep 12, 2021
1 parent 1fc98d1 commit e011213
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ The easy random extension provides a test with randomly generated objects, inclu
* Custom types: POJO, [except for records support](https://github.com/j-easy/easy-random/issues/397)
* Generic collections: List/Set/Stream/Array
* Java Validation annotations: @Email, @Pattern etc
* Custom Annotation with Validation annotation, such as @Phone

```java
@Documented
@Constraint(validatedBy = {})
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@Pattern(regexp = "(136|137|186)\\d{8}")
public @interface Phone {
}
```

# How to use?

Expand Down

0 comments on commit e011213

Please sign in to comment.