mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 07:15:45 +01:00
Most changes was made by php-cs-fixer. Also removes unused `RecursiveTreeIterator` class.
14 lines
242 B
PHP
14 lines
242 B
PHP
<?php
|
|
namespace Respect\Validation\Rules;
|
|
|
|
class NotEmpty extends AbstractRule
|
|
{
|
|
public function validate($input)
|
|
{
|
|
if (is_string($input)) {
|
|
$input = trim($input);
|
|
}
|
|
|
|
return !empty($input);
|
|
}
|
|
}
|