This callback is triggered after we validate the given login data, and the data is not valid.
Use this callback to clear the submit data from the previous request so that you don't get stuck in an
infinitive loop between login and login submit page.
967590
public function invalidLoginProvidedCallback()
    {
        $this->httpSession()->delete('username');
        $this->httpSession()->delete('password');
        $this->httpSession()->save('login_retry', 'true');
    }
123387
function(){
      var self = this; // stored this
      // Handle submit event
      $( this.form ).submit( function( e ) {
        // fields to be controlled transferred to global variable
        FIELDS = this.querySelectorAll('[data-validetta]');
        return self.init( e );
      });
      // real-time option control
      if( this.options.realTime === true ) {
        // handle change event for form elements (without checkbox)
        $( this.form ).find('[data-validetta]').not('[type=checkbox]').on( 'change', function( e ) {
          // field to be controlled transferred to global variable
          FIELDS = $( this );
          return self.init( e );
        });
        // handle click event for checkboxes
        $( this.form ).find('[data-validetta][type=checkbox]').on( 'click', function( e ) {
          // fields to be controlled transferred to global variable
          FIELDS = self.form.querySelectorAll('[data-validetta][type=checkbox][name="'+ this.name +'"]');
          return self.init( e );
        });
      }
      // handle <form> reset button to clear error messages
      $( this.form ).on( 'reset', function() {
        $( self.form.querySelectorAll( '.'+ self.options.errorClass +', .'+ self.options.validClass ) )
          .removeClass( self.options.errorClass +' '+ self.options.validClass );
        return self.reset();
      });
    }
1020965
public function clear()
    {
        if (null !== $this->_nextScrollId) {
            $this->_search->getClient()->request(
                '_search/scroll',
                Request::DELETE,
                [Search::OPTION_SCROLL_ID => [$this->_nextScrollId]]
            );

            // Reset scroll ID so valid() returns false.
            $this->_nextScrollId = null;
            $this->_currentResultSet = null;
        }
    }
592403
public function afterValidate()
    {
        parent::afterValidate(); // TODO: Change the autogenerated stub

        $this->dataProperties->validate();

        $this->addErrors($this->dataProperties->getErrors());
    }
326243
function removeInputValidator(inputId) {
  if (typeof inputId === 'string') {
      inputId = $(document.getElementById(inputId));
  }
  inputId.off('keyup').removeClass('validate-negative').removeClass('validate-positive');
}
725616
def form_valid(self, form):
        '''  '''
        form.cleaned_data.pop('template', None)
        self.request.session[EMAIL_VALIDATION_STR] = {'form_data': form.cleaned_data}
        return HttpResponseRedirect(reverse('emailConfirmation'))
688484
public function clear()
    {
        $this->_headerCollection = null;
        $this->_cookies = null;
        $this->_statusCode = 200;
        $this->reasonPhrase = 'OK';
        $this->data = null;
        $this->bodyRange = null;
        $this->isSent = false;
        $this->setBody(null);
    }
1274048
def validate_callback(callback):
    
    if not(hasattr(callback, '_validated')) or callback._validated == False:
        assert hasattr(callback, 'on_loop_start') \
               or hasattr(callback, 'on_loop_end'), \
               'callback must have `on_loop_start` or `on_loop_end` method'
        if hasattr(callback, 'on_loop_start'):
            setattr(callback, 'on_loop_start',
                    validate_callback_data(callback.on_loop_start))
        if hasattr(callback, 'on_loop_end'):
            setattr(callback, 'on_loop_end',
                    validate_callback_data(callback.on_loop_end))
        setattr(callback, '_validated', True)
    return callback
318153
void terminateRequest() {
        int oldVal = state;
        if (allAreSet(oldVal, FLAG_REQUEST_TERMINATED)) {
            // idempotent
            return;
        }
        if (requestChannel != null) {
            requestChannel.requestDone();
        }
        this.state = oldVal | FLAG_REQUEST_TERMINATED;
        if (anyAreSet(oldVal, FLAG_RESPONSE_TERMINATED)) {
            invokeExchangeCompleteListeners();
        }
    }
1083730
public function definition_after_data() {
        global $CFG, $DB, $OUTPUT;

        $mform = $this->_form;

        // If language does not exist, use site default lang.
        if ($langsel = $mform->getElementValue('lang')) {
            $lang = reset($langsel);
            // Check lang exists.
            if (!get_string_manager()->translation_exists($lang, false)) {
                $langel =& $mform->getElement('lang');
                $langel->setValue(core_user::get_property_default('lang'));
            }
        }

    }
84544
public function clear()
    {
        $this->id = null;
        $this->senderlogin = null;
        $this->receiverlogin = null;
        $this->transactionid = null;
        $this->billid = null;
        $this->amount = null;
        $this->message = null;
        $this->status = null;
        $this->datetime = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
390470
public function validate()
    {
        // Delete the file when requested
        if (true === $this->enableReset && $this->getPost($this->strName.'_reset')) {
            if (null !== ($fileModel = FilesModel::findByPk($this->varValue))) {
                $file = new File($fileModel->path);
                $file->delete();
            }

            unset($_FILES[$this->strName]);

            return;
        }

        // Handle file upload
        parent::validate();

        // Set the image as varValue
        $file = $_SESSION['FILES'][$this->strName];
        if (true === $file['uploaded']) {
            $this->varValue = StringUtil::uuidToBin($file['uuid']);
        } else {
            $this->blnSubmitInput = false;
        }
    }
1139830
function() {
			/// <summary>
			/// Resets the controlled form.
			/// Resets input fields to their original value (requires form plugin), removes classes
			/// indicating invalid elements and hides error messages.
			/// </summary>

			if ( $.fn.resetForm )
				$( this.currentForm ).resetForm();
			this.submitted = {};
			this.prepareForm();
			this.hideErrors();
			this.elements().removeClass( this.settings.errorClass );
		}
462977
function validate() {

    logger.logEnter('validate');

    for (var i = 0; i < buffer.length; i++) {

      var eventData = buffer[i],
        typeName = eventData[0],
        typeKeys = eventTypes[typeName];

      if (!typeKeys) {

        emitter.emit('error', typeName + ' is not a known event type.');

        // Remove these events.
        eventCount -= eventData.length - 1;
        buffer.splice(i, 1);
        i--;

      } else {

        for (var j = 1; j < eventData.length; j++) {

          if (!validEvent(Object.keys(eventData[j]), typeKeys, emitter, typeName)) {

            // Remove this event.
            eventCount--;
            if (eventData.length === 2) {
              buffer.splice(i, 1);
              i--;
              break;
            } else {
              eventData.splice(j, 1);
              j--;
            }
          }
        }
      }
    }

    logger.logExit('validate');
  }
454899
protected function _afterLogout()
    {
        \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('paymentid');
        \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('sShipSet');
        \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('deladrid');
        \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable('dynvalue');

        // resetting & recalc basket
        if (($oBasket = $this->getSession()->getBasket())) {
            $oBasket->resetUserInfo();
            $oBasket->onUpdate();
        }

        \OxidEsales\Eshop\Core\Registry::getSession()->delBasket();
    }
451894
def clean(self):
        
        username = self.cleaned_data.get('username')
        password = self.cleaned_data.get('password')

        if username and password:
            try:
                self.user = authenticate(request=self.request, username=username, password=password)
            except Exception:
                logger.exception("Error authenticating %s" % username)
                error_msg = _('Internal error while authenticating user')
                raise forms.ValidationError(error_msg)

            if self.user is None:
                logger.warning("Failed authentication for %s" % username)
                error_msg = _('The username or password is not correct')
                raise forms.ValidationError(error_msg)
            else:
                if not self.user.is_active:
                    logger.warning("User account %s is disabled" % username)
                    error_msg = _('This user account is disabled')
                    raise forms.ValidationError(error_msg)

        return self.cleaned_data
1267423
function definition_after_data() {
        $mform   = $this->_form;
        $columns = $this->_customdata['columns'];

        foreach ($columns as $column) {
            if ($mform->elementExists($column)) {
                $mform->removeElement($column);
            }
        }

        if (!in_array('password', $columns)) {
            // password resetting makes sense only if password specified in csv file
            if ($mform->elementExists('uuforcepasswordchange')) {
                $mform->removeElement('uuforcepasswordchange');
            }
        }
    }