11 lines
382 B
JavaScript
11 lines
382 B
JavaScript
const Joi = require('joi');
|
|
const domainRegistrySchema = Joi.object().keys({
|
|
register_domain_label: Joi.string().alphanum().min(1).max(63).required(),
|
|
register_domain_tld: Joi.string().valid("local", "tomato", "secret", "money", "lol", "lmao").required()
|
|
}).unknown(true);
|
|
|
|
module.exports = {
|
|
test: (body) => {
|
|
return domainRegistrySchema.validate(body);
|
|
}
|
|
} |