opensrs\OMA\SearchAdmins::validate PHP Method

validate() public static method

Valdation rule here
public static validate ( $data )
    public static function validate($data)
    {
        if (!empty($data['criteria']['type'])) {
            foreach ($data['criteria']['type'] as $type) {
                if (!in_array(strtolower($type), array('company', 'company_view', 'domain', 'mail', 'workgroup'))) {
                    throw new Exception('oSRS Error - one or more of company, company_view, domain, mail, and workgroup required');
                    return false;
                }
            }
        }
        return true;
    }
SearchAdmins