N°6414 Validator refactoring

New AbstractValidator class, with new method Validate
All existing validators are now children of AbstractRegexpValidator
Handle validators JS counterparts in renderers : only regexp validators are implemented client side
This commit is contained in:
Pierre Goiffon
2023-06-29 10:41:51 +02:00
parent 52049b7837
commit 6606af71ff
26 changed files with 348 additions and 247 deletions

View File

@@ -26,10 +26,10 @@ namespace Combodo\iTop\Form\Validator;
*
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
*/
class MandatoryValidator extends Validator
class MandatoryValidator extends AbstractRegexpValidator
{
const VALIDATOR_NAME = 'mandatory';
const DEFAULT_REGEXP = '.*\S.*';
const DEFAULT_ERROR_MESSAGE = 'Core:Validator:Mandatory';
public const VALIDATOR_NAME = 'mandatory';
public const DEFAULT_REGEXP = '.*\S.*';
public const DEFAULT_ERROR_MESSAGE = 'Core:Validator:Mandatory';
}