Co-authored-by: Alex Ghiu <alex.ghiu@ing.com> Co-authored-by: Gerjan van Geest <Gerjan.van.Geest@ing.com> Co-authored-by: Thijs Louisse <Thijs.Louisse@ing.com> Co-authored-by: Joren Broekema <joren.broekema@ing.com> Co-authored-by: Erik Kroes <erik.kroes@ing.com>
18 lines
420 B
JavaScript
18 lines
420 B
JavaScript
import { Validator } from '@lion/validate';
|
|
|
|
export class FormElementsHaveNoError extends Validator {
|
|
constructor() {
|
|
super();
|
|
this.name = 'FormElementsHaveNoError';
|
|
}
|
|
|
|
// eslint-disable-next-line class-methods-use-this
|
|
execute(value, options, config) {
|
|
const hasError = config.node._anyFormElementHasFeedbackFor('error');
|
|
return hasError;
|
|
}
|
|
|
|
static async getMessage() {
|
|
return '';
|
|
}
|
|
}
|