Disable validation for this instance.

@return $this
167783
public function disableValidation($once = false)
    {
        $this->skipValidation = ($once) ? Observer::SKIP_ONCE : Observer::SKIP_ALWAYS;

        return $this;
    }
548981
public function negatable() {
        $this->validated = false;
        $this->config[self::NEGATABLE] = true;
        return $this;
    }
961270
public function stop_fancy_stuff(): self
  {
    $this->setAttribute(\PDO::ATTR_STATEMENT_CLASS, [\PDOStatement::class]);
    $this->fancy = false;
    return $this;
  }
770756
public function reset()
    {
        $this->isBold = false;
        $this->isUnderline = false;
        $this->hasHighlightedBackground = false;
        $this->hasHighlightedForeground = false;
        $this->backgroundColor = Style::COLOR_BLACK;
        $this->foregroundColor = Style::COLOR_WHITE;

        return $this;
    }
96220
public function removeAllValidation()
    {
        if ($this->form) {
            foreach ($this->constraints as $fieldName => $constraints) {
                foreach ($constraints as $constraint) {
                    $constraint->removeParsley();
                    unset($constraint);
                }
            }
        }
        $this->constraints = array();
    }
1052041
public function enableValidation(array $validationGroups = []): self
    {
        $defaultValidationFailedEvent = $this->defaultValidationFailedEvent;
        $defaultThrowableEvent        = $this->defaultThrowableEvent;

        /**
         * @psalm-var class-string|null $defaultValidationFailedEvent
         * @psalm-var class-string|null $defaultThrowableEvent
         */

        return new self(
            $this->isEventListener,
            $this->isCommandHandler,
            true,
            $validationGroups,
            $defaultValidationFailedEvent,
            $defaultThrowableEvent
        );
    }
1092867
public function validate() {

		$result = parent::validate();

		// Confirm that the current attribute has been given a title.

		if($result->isValid() && !$this->Title) {
			$result->addError('"Title" required!');
		}

		// Allow extension customisation.

		$this->extend('validateMediaAttribute', $result);
		return $result;
	}
23132
public function validateDish(): callable
    {
        return function ($value): RecipeInterface {
            /**
             * @var Recipe $this
             */
            if ($this->exceptedDish instanceof DishInterface) {
                $this->exceptedDish->isExcepted($value);
            }

            return $this;
        };
    }
136790
public function buildValidator()
    {
        if ($this->validator_built) {
            return $this->validator;
        }

        foreach ($this->rows as $name => $row) {
            foreach ($row->getRules() as $rule) {
                $this->validator->addRule($name, $rule);
            }
            $row->disableRules();
        }
        $this->validator_built = true;

        return $this->validator;
    }
153822
public function validation()
    {
        $validator = new Validation();
        $validator->add(
            'email',
            new Email([
                'field' => 'email',
                'required' => true,
            ])
        );

        $validator->add(
            'displayname',
            new PresenceOf([
                'field' => 'displayname',
                'required' => true,
            ])
        );

        $validator->add(
            'displayname',
            new Regex([
                'field' => 'displayname',
                'message' => _('Please use alphanumerics only.'),
                'pattern' => '/^[A-Za-z0-9_.-]{1,16}$/',
            ])
        );

        // Unique values
        $validator->add(
            'email',
            new Uniqueness([
                'field' => 'email',
                'message' => _('This email already has an account.'),
            ])
        );

        $validator->add(
            'displayname',
            new Uniqueness([
                'field' => 'displayname',
                'message' => _('The username is already taken.'),
            ])
        );

        return $this->validate($validator);
    }
545035
public function boolean()
    {
        $message = ['%s is {{not|}} a boolean', $this->value];
        $this->assert(is_bool($this->value), $message);

        return $this;
    }
304637
public function disableTopOfFormBackup()
    {
        $command = new Command\Stored\DisableTopOfFormBackupCommand();
        $this->getComposite()->addCommand($command);
        return $this;
    }
494378
public function disable()
    {
        $updatedCheck = $this->ohDear->disableCheck($this->id);

        $this->enabled = $updatedCheck->enabled;
    }
23825
public function beforeValidate()
    {
        $validation = parent::beforeValidate();
        return $validation && PropertyStorageHelper::storageById($this->storage_id)->beforePropertyValidate($this);
    }
709169
protected function validateWrite()
    {
        if ($this->ObsoleteClassName) {
            return new ValidationException(
                "Object is of class '{$this->ObsoleteClassName}' which doesn't exist - " .
                "you need to change the ClassName before you can write it"
            );
        }

        // Note: Validation can only be disabled at the global level, not per-model
        if (DataObject::config()->uninherited('validation_enabled')) {
            $result = $this->validate();
            if (!$result->isValid()) {
                return new ValidationException($result);
            }
        }
        return null;
    }
953048
public function allow()
    {
        $roleNames = func_get_args();

        // Flatten array to allow array inputs
        $roleNames = Core::array_flatten($roleNames);

        foreach ($roleNames as $role) {

            if (!in_array($role, $this->allowedRoles)) {
                $this->allowedRoles[] = $role;
            }
        }

        return $this;
    }
574882
public function reset()
	{
		unset($this->_registry);
		unset($this->_mixin);
		unset($this->_errorHandler);
		unset($this->_errorContext);
		unset($this->_middleware);
		return $this;
	}