Skip to content

Variable: uuid

ts
const uuid: Validator<string>;

UUID validation / UUID 验证

Example

ts
uuid('550e8400-e29b-41d4-a716-446655440000') // => { isValid: true, message: undefined }
uuid('not-a-uuid') // => { isValid: false, message: 'Invalid UUID / UUID格式无效' }

Since

1.0.0

Released under the MIT License.