Skip to content

Variable: email ​

ts
const email: Validator<string>;

Email validation / 邮箱验证

Example ​

ts
email('test@example.com') // => { isValid: true, message: undefined }
email('bad-email') // => { isValid: false, message: 'Invalid email format / 邮箱格式无效' }

Since ​

1.0.0

Released under the MIT License.