Last active
December 30, 2015 02:49
-
-
Save argnist/7765663 to your computer and use it in GitHub Desktop.
Валидатор на заполненность телефона либо почты
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (($validator->required($param, $validator->fields[$param]) === true) || ($validator->required($key, $value) === true)) | |
{ | |
return true; | |
} | |
$validator->addError($key,'Почта и телефон пусты'); | |
return false; | |
/* | |
Usage: &validate=`phone:orRequired=^email^` &customValidators=`orRequired` | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment