Skip to content

Instantly share code, notes, and snippets.

@argnist
Last active December 30, 2015 02:49
Show Gist options
  • Save argnist/7765663 to your computer and use it in GitHub Desktop.
Save argnist/7765663 to your computer and use it in GitHub Desktop.
Валидатор на заполненность телефона либо почты
<?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