mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-05 17:21:16 +02:00
28 lines
505 B
PHP
28 lines
505 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)
|
|
{
|
|
}
|
|
}
|