silverstripe-framework/tests/php/Forms/EmailFieldTest/TestValidator.php

28 lines
505 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\Forms\Tests\EmailFieldTest;
use Exception;
use SilverStripe\Forms\Validator;
use SilverStripe\ORM\ValidationResult;
2016-10-14 03:30:05 +02:00
class TestValidator extends Validator
{
public function validationError(
$fieldName,
$message,
$messageType = ValidationResult::TYPE_ERROR,
$cast = ValidationResult::CAST_TEXT
) {
throw new Exception($message);
}
2016-10-14 03:30:05 +02:00
public function javascript()
{
}
2016-10-14 03:30:05 +02:00
public function php($data)
{
}
2016-10-14 03:30:05 +02:00
}