added help component, improved prediction with model templates
This commit is contained in:
@ -103,6 +103,14 @@ export class ValidationService {
|
||||
return {ok: true, error: ''};
|
||||
}
|
||||
|
||||
url(data) {
|
||||
const {ignore, error} = Joi.string().uri().validate(data);
|
||||
if (error) {
|
||||
return {ok: false, error: `must be a valid URL`};
|
||||
}
|
||||
return {ok: true, error: ''};
|
||||
}
|
||||
|
||||
unique(data, list) {
|
||||
const {ignore, error} = Joi.string().allow('').invalid(...list.map(e => e.toString())).validate(data);
|
||||
if (error) {
|
||||
|
Reference in New Issue
Block a user