Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (16 sloc) 368 Bytes
/**
* 导出声明
* @export
* @interface StringValidator
*/
export interface StringValidator {
isAcceptable(s: string): boolean;
}
export const MobileReg = /^[0-9]{11}$/
class MobileValidator implements StringValidator {
isAcceptable(s: string): boolean {
return MobileReg.test(s)
}
}
export {MobileValidator}
export {MobileValidator as MainValidator}
You can’t perform that action at this time.