opensrs\domains\bulkchange\changetype\DomainContacts::validateChangeType PHP Method

validateChangeType() public method

public validateChangeType ( $dataObject )
    public function validateChangeType($dataObject)
    {
        foreach ($this->checkFields as $field) {
            if (!isset($dataObject->data->{$field}) || !$dataObject->data->{$field}) {
                throw new Exception("oSRS Error - change type is {$this->change_type} but {$field} is not defined.");
            }
        }
        if (!isset($dataObject->personal) || $dataObject->personal == '') {
            throw new Exception("oSRS Error - change type is {$this->change_type} but personal is not defined.");
        }
        return true;
    }