2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\Forms\Tests\EmailFieldTest;
|
|
|
|
|
|
|
|
use Exception;
|
|
|
|
use SilverStripe\Forms\Validator;
|
2016-11-23 06:09:10 +01:00
|
|
|
use SilverStripe\ORM\ValidationResult;
|
2016-10-14 03:30:05 +02:00
|
|
|
|
|
|
|
class TestValidator extends Validator
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
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
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function javascript()
|
|
|
|
{
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function php($data)
|
|
|
|
{
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|