joi phone number validation code example Example: joi phone number validation joi.string().length(10).pattern(/^[0-9]+$/);