material and activeModelIndex fix
This commit is contained in:
@ -71,6 +71,14 @@ export class ValidationService {
|
||||
return {ok: true, error: ''};
|
||||
}
|
||||
|
||||
stringNin(data, list) {
|
||||
const {ignore, error} = Joi.string().invalid(...list).validate(data);
|
||||
if (error) {
|
||||
return {ok: false, error: 'value not allowed'};
|
||||
}
|
||||
return {ok: true, error: ''};
|
||||
}
|
||||
|
||||
stringLength(data, length) {
|
||||
const {ignore, error} = Joi.string().max(length).allow('').validate(data);
|
||||
if (error) {
|
||||
|
Reference in New Issue
Block a user