cheke
Version:
Express request validator with object's style response body and inspired by Laravel's Validator
1 lines • 213 B
JavaScript
const notUUIDMessage=require("../messages/notUUIDMessage"),regx=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;module.exports=({value:a,label:b}={})=>!regx.test(a)&¬UUIDMessage(b);