Ejemplo n.º 1
0
function matchCallbacks($params)
{
    $match = AMatch::runMatch($params, AMatch::FLAG_DONT_STOP_MATCHING)->parent_id('/^-?\\d+$/', 'AMatchString::pregMatch')->title(12, 'AMatchString::length')->email('([\\w-]+@([\\w-]+\\.)+[\\w-]+)', 'AMatchString::isEmail')->links(AMatchArray::FLAG_EMPTY_SOME_ELEMENT, 'AMatchArray::isNotEmpty');
    result($match);
}
Ejemplo n.º 2
0
function checkDocumentData($data)
{
    $result = AMatch::runMatch($data)->flag('experiment')->flag(9, 'AMatchString::minLength')->flag(11, 'AMatchString::maxLength')->from_topic(specialValidation(), true)->from_topic(false)->checker('', 'smartbool')->link_id(AMatch::OPTIONAL, 'int');
    return array($result->stopMatch(), $result->matchComments(), $result->matchCommentsConditions());
}