silverstripe-framework/tests/php/Forms/EmailFieldTest/TestValidator.php
Damian Mooyman 6e589aac75
API Updates to Form, ValidationResponse, ValidationException
API Implement form schema "errors" handling
2016-12-09 14:24:11 +13:00

25 lines
442 B
PHP

<?php
namespace SilverStripe\Forms\Tests\EmailFieldTest;
use Exception;
use SilverStripe\Forms\Validator;
use SilverStripe\ORM\ValidationResult;
class TestValidator extends Validator
{
public function validationError(
$fieldName, $message, $messageType = ValidationResult::TYPE_ERROR, $cast = ValidationResult::CAST_TEXT
) {
throw new Exception($message);
}
public function javascript()
{
}
public function php($data)
{
}
}