Reset validation rules.

@param string|bool $formName Form name
430907
public function reset($formName = false)
    {
        if (is_bool($formName))
            $formName = $this->currentFormName;

        if (array_key_exists($formName, $this->validationRules)) {
            $this->validationRules[$formName] = [];
        }
    }
658314
function(formName) {
        var currentFieldsValidations,
            currentFieldsValue,
            currentValidationMethodAndParameters,
            i;

        this.currentForm = formName;
        this.errors = {};

        for (var fieldName in this.validationInformation[formName]) {
            this.currentField = fieldName;
            currentFieldsValidations = this.validationInformation[formName][fieldName];
            currentFieldsValue = this.utils.getFieldsValue(this.currentForm, this.currentField);

            for (i = 0; i < currentFieldsValidations.length; i++) {
                var method,
                    parameters = [];

                currentValidationMethodAndParameters = this.getValidationMethodAndParameters(currentFieldsValidations[i]);
                method = currentValidationMethodAndParameters[0];

                // Here we check to see if our parameters actually exist and if it does then store it.
                if (currentValidationMethodAndParameters.length === 2) {
                    parameters = currentValidationMethodAndParameters[1];
                }

                if (! this.callValidationMethodWithParameters(method, parameters, currentFieldsValue)) {
                    parameters.shift();
                    this.messages.addValidationErrorMessage(method, parameters);
                }
            }
        }

        // If there are no errors populated in the errors property then we passed.
        return this.utils.isEmptyObject(this.errors);
    }
1331321
public void clearInput() {
        Log.v(TAG, "Input cleared and validation errors removed");
        input.setText("");
        hasValidInput = true;
        updateBorder();
        showPasswordToggle.setChecked(false);
    }
779142
public function reset_rule() {
        $this->raw_set('ruleoutcome', static::OUTCOME_NONE);
        $this->raw_set('ruletype', null);
        $this->raw_set('ruleconfig', null);
    }
299445
def clean(self):
        
        raise forms.ValidationError(
            self.error_messages['invalid_login'],
            code='invalid_login',
            params={'username': self.username_field.verbose_name}
        )
166433
private function validateSettingName($name)
    {
        if (!isset($this->settingsSchema[$name])) {
            return new ValidationError(
                "Setting '%setting%' is unknown",
                null,
                [
                    '%setting%' => $name,
                ],
                "[$name]"
            );
        }

        return null;
    }
1315073
public function Reset( $options = null ){
		$this->rules = array();
		self::$imports = array();
		self::$has_extends = false;
		self::$imports = array();
		self::$contentsMap = array();

		$this->env = new Less_Environment($options);
		$this->env->Init();

		//set new options
		if( is_array($options) ){
			$this->SetOptions(Less_Parser::$default_options);
			$this->SetOptions($options);
		}
	}
449689
public function runAction($name, $className, $fieldName, $validatorName)
    {
        $this->formName = $name;
        $this->formClassName = $className;
        $this->fieldName = $fieldName;
        $this->validatorName = $validatorName;
        $this->form = $this->getForm();

        $this->formObject = $this->getFormObject();
        $this->formObject->setForm($this->form);

        $this->validation = $this->getFieldValidation();

        $validatorDataObject = new ValidatorDataObject($this->formObject, $this->validation);

        /** @var ValidatorInterface $validator */
        $validator = Core::instantiate(
            $this->validation->getClassName(),
            $this->validation->getOptions(),
            $validatorDataObject
        );

        $fieldValue = ObjectAccess::getProperty($this->form, $this->fieldName);
        $result = $validator->validate($fieldValue);

        $this->result->merge($result);
    }
865766
private void resetValidationState() {
		// if User Model exists it will be returned, othewise Shared Model is returned
		final FileWidgetModel componentModel = getComponentModel();
		// If Shared Model is returned then both fileType and fileSize are always valid
		// If User Model is returned check if any if any is false
		if (!componentModel.validFileSize || !componentModel.validFileType) {
		    final FileWidgetModel userModel = getOrCreateComponentModel();
		    userModel.validFileType = true;
		    userModel.validFileSize = true;

		}
	}
508737
private function setConditionFormName(\Magento\Rule\Model\Condition\AbstractCondition $conditions, $formName)
    {
        $conditions->setJsFormObject($formName);

        if ($conditions->getConditions() && is_array($conditions->getConditions())) {
            foreach ($conditions->getConditions() as $condition) {
                $this->setConditionFormName($condition, $formName);
            }
        }
    }
167806
public function validate(FormEvent $event)
    {
        /** @var Alias $alias */
        $alias = $event->getData()->getNode()->alias;

        if ($alias instanceof ValueHolderInterface) {
            $alias = $alias->getWrappedValueHolderValue();
        }

        $violations = $this->validator->validate($alias);

        if (!$violations) {
            return;
        }

        $mapper = new ViolationMapper();
        /** @var ConstraintViolationInterface $violation */
        foreach ($violations as $violation) {
            $mapper->mapViolation($violation, $event->getForm(), true);
        }
    }
424780
protected function setName($name)
    {
        if (false === is_string($name)) {
            $type = gettype($name);
            throw new ValidationException("Term 'name' must be of type string. Type $type received.");
        }

        $this->name = $name;
    }
1249467
private function resetProperties()
    {
        $this->isValid = false;
        $this->sex = null;
        $this->countryBirth = null;
        $this->dayBirth = null;
        $this->monthBirth = null;
        $this->yearBirth = null;
        $this->error = null;
    }
313444
public static function resetRevalidationCounter(string $variableName = '_MF_SESSION_REVALIDATION_COUNTER_'): void
    {
        static::init();
        $variableName = (string)$variableName;
        $vHandler = Variables::getInstance();
        if ($vHandler->session->get($variableName, Variables::TYPE_INT) > 0) {
            $vHandler->session->set($variableName, 0);
            \session_regenerate_id(true);
        }
    }
629856
public function reset($full = true) {
		static::$markerCount = static::$infoWindowCount = 0;
		$this->markers = $this->infoWindows = [];
		if ($full) {
			$this->_runtimeConfig = $this->_config;
		}
	}
524718
public function resetStyle($tagName = '')
    {
        // prepare somme values
        $border = $this->readBorder('solid 1px #000000');
        $units = array(
            '1px' => $this->cssConverter->convertToMM('1px'),
            '5px' => $this->cssConverter->convertToMM('5px'),
        );

        // prepare the Collapse attribute
        $collapse = isset($this->value['border']['collapse']) ? $this->value['border']['collapse'] : false;
        if (!in_array($tagName, array('tr', 'td', 'th', 'thead', 'tbody', 'tfoot'))) {
            $collapse = false;
        }

        // set the global css values
        $this->value['position']   = null;
        $this->value['x']          = null;
        $this->value['y']          = null;
        $this->value['width']      = 0;
        $this->value['height']     = 0;
        $this->value['top']        = null;
        $this->value['right']      = null;
        $this->value['bottom']     = null;
        $this->value['left']       = null;
        $this->value['float']      = null;
        $this->value['display']    = null;
        $this->value['rotate']     = null;
        $this->value['overflow']   = 'visible';
        $this->value['background'] = array('color' => null, 'image' => null, 'position' => null, 'repeat' => null);
        $this->value['border']     = array(
            't' => $this->readBorder('none'),
            'r' => $this->readBorder('none'),
            'b' => $this->readBorder('none'),
            'l' => $this->readBorder('none'),
            'radius' => array(
                'tl' => array(0, 0),
                'tr' => array(0, 0),
                'br' => array(0, 0),
                'bl' => array(0, 0)
            ),
            'collapse' => $collapse,
        );

        // specific values for some tags
        if (!in_array($tagName, array('h1', 'h2', 'h3', 'h4', 'h5', 'h6'))) {
            $this->value['margin'] = array('t'=>0,'r'=>0,'b'=>0,'l'=>0);
        }

        if (in_array($tagName, array('input', 'select', 'textarea'))) {
            $this->value['border']['t'] = null;
            $this->value['border']['r'] = null;
            $this->value['border']['b'] = null;
            $this->value['border']['l'] = null;
        }

        if ($tagName === 'p') {
            $this->value['margin']['t'] = null;
            $this->value['margin']['b'] = null;
        }
        if ($tagName === 'blockquote') {
            $this->value['margin']['t'] = 3;
            $this->value['margin']['r'] = 3;
            $this->value['margin']['b'] = 3;
            $this->value['margin']['l'] = 6;
        }
        $this->value['margin-auto'] = false;

        if (in_array($tagName, array('blockquote', 'div', 'fieldset'))) {
            $this->value['vertical-align'] = 'top';
        }

        if (in_array($tagName, array('fieldset', 'legend'))) {
            $this->value['border'] = array(
                't' => $border,
                'r' => $border,
                'b' => $border,
                'l' => $border,
                'radius' => array(
                    'tl' => array($units['5px'], $units['5px']),
                    'tr' => array($units['5px'], $units['5px']),
                    'br' => array($units['5px'], $units['5px']),
                    'bl' => array($units['5px'], $units['5px'])
                ),
                'collapse' => false,
            );
        }

        if (in_array($tagName, array('ul', 'li'))) {
            $this->value['list-style-type']  = '';
            $this->value['list-style-image'] = '';
        }

        if (!in_array($tagName, array('tr', 'td'))) {
            $this->value['padding'] = array(
                't' => 0,
                'r' => 0,
                'b' => 0,
                'l' => 0
            );
        } else {
            $this->value['padding'] = array(
                't' => $units['1px'],
                'r' => $units['1px'],
                'b' => $units['1px'],
                'l' => $units['1px']
            );
        }

        if ($tagName === 'hr') {
            $this->value['border'] = array(
                't' => $border,
                'r' => $border,
                'b' => $border,
                'l' => $border,
                'radius' => array(
                    'tl' => array(0, 0),
                    'tr' => array(0, 0),
                    'br' => array(0, 0),
                    'bl' => array(0, 0)
                ),
                'collapse' => false,
            );
            $this->cssConverter->convertBackground('#FFFFFF', $this->value['background']);
        }

        $this->value['xc'] = null;
        $this->value['yc'] = null;
    }
158401
final public function validate($form)
    {
        $this->initializeValidator($form);

        $formObject = $this->formValidatorExecutor->getFormObject();
        $formObject->markFormAsSubmitted();
        $formObject->setForm($form);

        $this->validateGhost($form, false);

        $formObject->setFormResult($this->result);

        return $this->result;
    }