com.github.fashionbrot.validated.annotation.BankCard Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mars-validated Show documentation
Show all versions of mars-validated Show documentation
mars-validated 参数验证 https://github.com/fashionbrot/mars-validated
package com.github.fashionbrot.validated.annotation;
import java.lang.annotation.*;
/**
* 验证银行卡
* String
*/
@Documented
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Mars
public @interface BankCard {
String msg() default "com.spv.valid.CreditCard.msg";
/**
* 正则表达式
* @return String
*/
String regexp() default "^([1-9]{1})(\\d{14}|\\d{18})$";
}