respect-validation/library/Respect/Validation/Exceptions/AttributeException.php

21 lines
404 B
PHP
Raw Normal View History

2010-12-06 02:17:12 +01:00
<?php
namespace Respect\Validation\Exceptions;
class AttributeException extends AbstractRelatedException
2010-12-06 02:17:12 +01:00
{
2010-12-06 02:17:12 +01:00
public static $defaultTemplates = array(
'"%2$s" is not present',
'"%2$s" is invalid',
2010-12-06 02:17:12 +01:00
);
public function chooseTemplate($input, $attributeName, $hasTheAttribute)
{
if (!$hasTheAttribute)
return 0;
2010-12-06 02:17:12 +01:00
else
return 1;
2010-12-06 02:17:12 +01:00
}
}