diff options
Diffstat (limited to 'libs/SimpleValidator/Validators/Alpha.php')
-rw-r--r-- | libs/SimpleValidator/Validators/Alpha.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/SimpleValidator/Validators/Alpha.php b/libs/SimpleValidator/Validators/Alpha.php new file mode 100644 index 00000000..c29ba481 --- /dev/null +++ b/libs/SimpleValidator/Validators/Alpha.php @@ -0,0 +1,15 @@ +<?php + +namespace SimpleValidator\Validators; + +class Alpha extends Base +{ + public function execute(array $data) + { + if ($this->isFieldNotEmpty($data)) { + return ctype_alpha($data[$this->field]); + } + + return true; + } +} |