Performs password reset validation
@param array $submitted
@param array $options
@return array|boolean
429030
public function resetPassword(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $email = $this->getSubmitted('email');
        $password = $this->getSubmitted('password');

        if (isset($password)) {
            $this->validateStatusUser();
            $this->validatePasswordLengthUser();
        } else if (isset($email)) {
            $this->validateEmail();
            $this->validateEmailExistsUser();
        }

        return $this->getResult();
    }
447653
public function integer(array $submitted, array $options)
    {
        $options += array(
            'field' => null,
            'label' => null
        );

        $value = gplcart_array_get($submitted, $options['field']);

        if (filter_var($value, FILTER_VALIDATE_INT) === false) {
            return $this->setErrorInteger($options['field'], $options['label']);
        }

        return true;
    }
260246
public function store(array &$submitted, array $options)
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateStore();
        $this->validateBool('status');
        $this->validateDomainStore();
        $this->validateBasepathStore();
        $this->validateName();
        $this->validateDataStore();
        $this->validateImagesStore();
        $this->validateDefaultStore();

        $this->unsetSubmitted('update');

        return $this->getResult();
    }
202042
private function validateInput( $settings ) {
        if ( !isset( $settings["serverUrl"] ) ||
             !isset( $settings["username"] ) ||
             !isset( $settings["password"] )
        ) {
            throw new \InvalidArgumentException( 'Username, password or serverUrl is incorrect' );
        }

        if ( !filter_var( $settings["serverUrl"], FILTER_VALIDATE_URL )
             || strpos( $settings["serverUrl"], "." ) === false
        ) {
            throw new \InvalidArgumentException( 'Invalid serverUrl has been provided' );
        }

        if ( !in_array( $settings['authMode'], [ 'OnlineFederation', 'Federation' ] ) ) {
            throw new \InvalidArgumentException( 'Provided authentication mode <' . $this->authMode . '> is not supported' );
        }
    }
432878
public function imageStyle(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateImageStyle();
        $this->validateName();
        $this->validateBool('status');
        $this->validateActionsImageStyle();

        $this->unsetSubmitted('update');

        return $this->getResult();
    }
839183
public function run($handler_id, &$submitted, array $options = array())
    {
        $result = null;
        $this->hook->attach('validator.run.before', $submitted, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $result = $this->callHandler($handler_id, $submitted, $options);
        $this->hook->attach('validator.run.after', $submitted, $options, $result, $this);

        if ($result === true) {
            return true;
        }

        return empty($result) ? $this->translation->text('Failed validation') : $result;
    }
294879
public function collection(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateCollection();
        $this->validateBool('status');
        $this->validateTitle();
        $this->validateDescription();
        $this->validateTranslation();
        $this->validateStoreId();
        $this->validateTypeCollection();

        $this->unsetSubmitted('update');

        return $this->getResult();
    }
890236
public function passwordInput(array $options = [])
    {
        $this->element = Angular::password('{model}', '{label}', [
            'fieldid' => $this->form->getFieldId($this->attribute),
            'ng-init' => '{initValue}',
        ]);
        
        return $this;
    }
695486
protected function validateOptions(array $options)
    {
        $validated = [];

        foreach ($options as $name => $option) {
            if (! in_array($name, $this->getAllowedOptions())) {
                throw new DomainException('The "'.$name.'" option is not allowed on the provided form.');
            }

            $validated[$name] = $option;
        }

        return $validated;
    }
287698
public function wishlist(array &$submitted, array $options)
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateWishlist();
        $this->validateProductWishlist();
        $this->validateUserCartId();
        $this->validateStoreId();

        $this->unsetSubmitted('update');

        return $this->getResult();
    }
742684
private static function validateOptions(array $options)
    {
        foreach ($options as $key => $value) {
            if (!isset(self::$types[$key])) {
                throw new \DomainException("Unknown option: $key");
            }
            if ($key === 'autoschedule' && !defined('CURLMOPT_MAX_TOTAL_CONNECTIONS')) {
                throw new \OutOfBoundsException('"autoschedule" can be used only on PHP 7.0.7 or later.');
            }
            $validator = [__CLASS__, 'validate' . self::$types[$key]];
            $options[$key] = $validator($key, $value);
        }
        return $options;
    }
693240
public function validateForm(array $input, $early_exit = false)
    {
        $result = new Result($input);
        foreach ($this->rules as $name => $rules) {
            //skip a value if it is not required...
            if (!isset($this->required[$name])) {
                //and not submitted.
                //here 'submitted' means either not existing or failing submitted()
                if (!isset($input[$name]) || !$this->submitted($input[$name])) {
                    continue;
                }
            }
            $this->doValidation($result, $input, $name, $rules, $early_exit);
        }

        return $result;
    }
959111
public function user(array &$submitted, array $options)
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateUser();
        $this->validateBool('status');
        $this->validateName();
        $this->validateEmail();
        $this->validateEmailUniqueUser();
        $this->validatePasswordUser();
        $this->validatePasswordLengthUser();
        $this->validatePasswordOldUser();
        $this->validateStoreId();
        $this->validateRoleUser();
        $this->validateTimezoneUser();
        $this->validateData();

        $this->unsetSubmitted('update');

        return $this->getResult();
    }
122529
public function password($name, array $options = [])
    {
        return $this->form->password($name,
                                     $this->addFormControlClass($this->getFieldOptions($name, $options)));
    }
129563
public function productBundle(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateProductProductBundle();
        $this->validateItemsProductBundle();

        return $this->getResult();
    }
1150706
public function currency(array &$submitted, array $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateCurrency();
        $this->validateBool('default');
        $this->validateBool('status');
        $this->validateCodeCurrency();
        $this->validateName();
        $this->validateNumericCodeCurrency();
        $this->validateSymbolCurrency();
        $this->validateMajorUnitCurrency();
        $this->validateMinorUnitCurrency();
        $this->validateConvertionRateCurrency();
        $this->validateDecimalsCurrency();
        $this->validateRoundingStepCurrency();

        $this->unsetSubmitted('update');

        return $this->getResult();
    }
1082209
public function resetPassword($token = null, $options = []) {
		$options = Hash::merge($this->getConfig('resetPassword'), $options);

		$tokenParam = $this->_getRequest()->getQuery($options['queryParam']);
		if (!empty($tokenParam)) {
			$token = $tokenParam;
		}

		// Check of the token exists
		try {
			$entity = $this->UserTable->verifyPasswordResetToken($token, $options['tokenOptions']);
		} catch (RecordNotFoundException $e) {
			if (empty($options['errorMessage']) && $options['errorMessage'] !== false) {
				$options['errorMessage'] = $e->getMessage();
			}

			$redirect = $this->handleFlashAndRedirect('invalidError', $options);
			if ($redirect instanceof Response) {
				return $redirect;
			}
			$entity = $this->UserTable->newEntity();
		}

		// Check if the token has expired
		if ($entity->get('token_is_expired') === true) {
			if (empty($options['invalidErrorMessage'])) {
				$options['invalidErrorMessage'] = $e->getMessage();
			}
			$redirect = $this->handleFlashAndRedirect('expiredError', $options);
			if ($redirect instanceof Response) {
				return $redirect;
			}
		}

		// Handle the POST
		if ($this->_getRequest()->is('post')) {
			$entity = $this->UserTable->patchEntity($entity, $this->_getRequest()->getData());
			if ($this->UserTable->resetPassword($entity)) {
				$redirect = $this->handleFlashAndRedirect('success', $options);
			} else {
				$redirect = $this->handleFlashAndRedirect('error', $options);
			}
			if ($redirect instanceof Response) {
				return $redirect;
			}
		} else {
			$entity = $this->UserTable->newEntity();
		}

		$this->_setViewVar('entity', $entity);
	}