Processes this entry widget

If any validation type errors occur, an error message is attached to
this entry widget.
558577
public function process()
    {
        parent::process();

        // if nothing was submitted by the user, shortcut return
        if (!$this->hasRawValue()) {
            $this->value = null;
            return;
        }

        $this->value = $this->getRawValue();

        if ($this->auto_trim) {
            $this->value = trim($this->value);
            if ($this->value === '') {
                $this->value = null;
            }
        }

        $len = $this->value === null ? 0 : mb_strlen($this->value);

        if (!$this->required && $this->value === null) {
            return;
        } elseif ($this->value === null) {
            $this->addMessage($this->getValidationMessage('required'));
        } elseif ($this->maxlength !== null && $len > $this->maxlength) {
            $message = $this->getValidationMessage('too-long');
            $message->primary_content = sprintf(
                $message->primary_content,
                $this->maxlength
            );

            $this->addMessage($message);
        } elseif ($this->minlength !== null && $len < $this->minlength) {
            $message = $this->getValidationMessage('too-short');
            $message->primary_content = sprintf(
                $message->primary_content,
                $this->minlength
            );

            $this->addMessage($message);
        }
    }
821354
protected function performValidation()
    {
        // All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.
        foreach (array_keys($this->attributes()) as $attribute) {
            if (is_array($this->$attribute)) {
                foreach ($this->$attribute as $k => $v) {
                    if (!preg_match('~^[a-zA-Z0-9\.\-_]+$~', $k)) {
                        $this->addError("Invalid key '$k' used in Components Object for attribute '$attribute', does not match ^[a-zA-Z0-9\.\-_]+\$.");
                    }
                }
            }
        }
    }
580100
function handleError(err) {
  if (typeof err === 'string' && errors[err]) {
    console.error(errors[err]);
  } else {
    if (argv.verbose) {
      console.error(err.stack);
    } else {
      console.error(err.message);
    }
  }
  process.exit(1);
}
825562
public function process_failure() {
		if ( ! count( $this->results ) || ! count( $this->not_valid_actions ) ) {
			return;
		}

		foreach ( $this->not_valid_actions as $action ) {
			switch ( $action ) {
				case 'deactivate':
					deactivate_plugins( $this->get_plugin( 'basename' ), true );

					if ( isset( $_GET['activate'] ) ) {
						unset( $_GET['activate'] );
					}
					break;

				case 'admin_notice':
					add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
					break;
			}
		}
	}
296071
protected void showError() {

        if (hasError()) {
            m_label.getElement().getStyle().clearDisplay();
            CmsFadeAnimation.fadeIn(m_label.getElement(), new Command() {

                /**
                 * @see com.google.gwt.user.client.Command#execute()
                 */
                public void execute() {

                    // noop
                }
            }, 300);
        }
    }
206439
def validate(self, value, model_instance):
        
        if not isinstance(value, base.StateWrapper):
            raise exceptions.ValidationError(self.error_messages['wrong_type'] % value)
        elif not value.workflow == self.workflow:
            raise exceptions.ValidationError(self.error_messages['wrong_workflow'] % value.workflow)
        elif value.state not in self.workflow.states:
            raise exceptions.ValidationError(self.error_messages['invalid_state'] % value.state)
709163
public void init() {
        if (initialized) { return; }
        Widget parent = inputWidget.getParent();
        while (parent != null && !parent.getClass().getName().equals("com.google.gwt.user.client.ui.Widget")) {
            if (parent instanceof HasValidationState) {
                validationStateParent = (HasValidationState) parent;
                validationStateHelpBlock = findHelpBlock(inputWidget);
                break;
            }
            parent = parent.getParent();
        }
        if (inputWidget.isAttached() || validationStateParent != null) {
            initialized = true;
        }
    }
1140463
private void updateErrors() {
		boolean oldErrors = hasErrors;
		hasErrors = false;
		if (validationResults.getHasErrors()) {
			hasErrors = true;
		}
		else {
			Iterator childIter = children.iterator();
			while (childIter.hasNext()) {
				ValidationResultsModel childModel = (ValidationResultsModel) childIter.next();
				if (childModel.getHasErrors()) {
					hasErrors = true;
					break;
				}
			}
		}
		firePropertyChange(HAS_ERRORS_PROPERTY, oldErrors, hasErrors);
	}
58475
def _on_process_error(self, error):
        
        if self is None:
            return
        err = PROCESS_ERROR_STRING[error]
        self._formatter.append_message(err + '\r\n', output_format=OutputFormat.ErrorMessageFormat)
935544
public function process()
    {
        // {{{ defines the xhtml template

        static $xhtml_template = '';

        if ($xhtml_template == '') {
            $doctype =
                '<!DOCTYPE html PUBLIC ' .
                '"-//W3C//DTD XHTML 1.0 Strict//EN" ' .
                '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' .
                "\n";

            $xhtml_template =
                $doctype .
                <<<XHTML
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>SwatXHTMLTextarea Content</title>
	</head>
	<body>
		<div>
		%s
		</div>
	</body>
</html>

XHTML;
        }

        // }}}

        parent::process();

        $ignore_validation_errors =
            $this->allow_ignore_validation_errors &&
            $this->ignore_errors_checkbox->value;

        $xhtml_content = sprintf($xhtml_template, $this->getXHTMLContent());

        $errors = libxml_use_internal_errors(true);

        $document = new DOMDocument();
        $document->loadXML(
            $xhtml_content,
            LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID
        );

        $xml_errors = libxml_get_errors();
        libxml_clear_errors();
        libxml_use_internal_errors($errors);

        if (count($xml_errors) > 0 && !$ignore_validation_errors) {
            $this->addMessage($this->getValidationErrorMessage($xml_errors));
            $this->has_validation_errors = true;
        }
    }
767617
public void validateAndSubmit() {

        CmsValidationController validationController = new CmsValidationController(
            m_fields.values(),
            new I_CmsValidationHandler() {

                /**
                 * @see org.opencms.gwt.client.validation.I_CmsValidationHandler#onValidationFinished(boolean)
                 */
                public void onValidationFinished(boolean ok) {

                    m_formHandler.onSubmitValidationResult(CmsForm.this, ok);
                }

                /**
                 * @see org.opencms.gwt.client.validation.I_CmsValidationHandler#onValidationResult(java.lang.String, org.opencms.gwt.shared.CmsValidationResult)
                 */
                public void onValidationResult(String field, CmsValidationResult result) {

                    updateFieldValidationStatus(field, result);

                }

            });
        validationController.setFormValidator(m_validatorClass);
        validationController.setFormValidatorConfig(createValidatorConfig());
        startValidation(validationController);
    }
1338441
public function process()
	{
		$context = $this->getContext();
		$view = $this->getView();

		try
		{
			parent::process();
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->filterErrorList = $view->get( 'filterErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
1244894
public function process()
    {
        parent::process();

        if (!$this->processValue()) {
            return;
        }

        if (
            $this->required &&
            $this->isSensitive() &&
            $this->selected_page == ''
        ) {
            $this->addMessage($this->getValidationMessage('required'));
        }

        foreach ($this->pages as $page) {
            if ($page->id == $this->selected_page) {
                $page->process();
            }
        }
    }
397789
function MIDIInvalidEventError(message) {
    Error.call(this);
    Error.captureStackTrace(this, this.constructor);

    this.name = this.constructor.name;
    this.message = message;
}
731027
public function process()
    {
        $data = &$this->getForm()->getFormData();

        if (!isset($data[$this->id])) {
            $this->value = null;
        } elseif ($data[$this->id] == '') {
            $this->value = null;
        } else {
            $this->value = $data[$this->id];
        }

        $this->values = $this->splitValues($this->value);
        $locale = SwatI18NLocale::get();

        if (!$this->required && count($this->values) === 0) {
            return;
        } elseif (
            $this->max_entries > 0 &&
            count($this->values) > $this->max_entries
        ) {
            $message = sprintf(
                Swat::_('The %%s field cannot have more than %s entries.'),
                $locale->formatNumber($this->max_entries)
            );

            $this->addMessage(new SwatMessage($message, 'error'));
        } elseif (
            $this->required &&
            count($this->values) < $this->min_entries
        ) {
            $message = sprintf(
                Swat::ngettext(
                    'The %%s field must have at least %s entry.',
                    'The %%s field must have at least %s entries.',
                    $this->min_entries
                ),
                $locale->formatNumber($this->min_entries)
            );

            $this->addMessage(new SwatMessage($message, 'error'));
        }

        // validate individual values

        $min_length_msg = null;
        $max_length_msg = null;
        $min_length_error_values = array();
        $max_length_error_values = array();

        foreach ($this->values as $value) {
            $len = mb_strlen($value);
            if ($this->maxlength !== null && $len > $this->maxlength) {
                $max_length_msg =
                    sprintf(
                        Swat::ngettext(
                            'Entries in the %%s field must be less than %s ' .
                                'character long.',
                            'Entries in the %%s field must be less than %s ' .
                                'characters long.',
                            $this->maxlength
                        ),
                        $locale->formatNumber($this->maxlength)
                    ) . ' ';

                $max_length_error_values[] = $value;
            } elseif ($this->minlength !== null && $len < $this->minlength) {
                $min_length_msg =
                    sprintf(
                        Swat::ngettext(
                            'Entries in the %%s field must be at least %s ' .
                                'character long.',
                            'Entries in the %%s field must be at least %s ' .
                                'characters long.',
                            $this->minlength
                        ),
                        $locale->formatNumber($this->minlength)
                    ) . ' ';

                $min_length_error_values[] = $value;
            }
        }

        if ($min_length_msg !== null) {
            $min_length_msg .= sprintf(
                Swat::ngettext(
                    'The following entry is too short: %s.',
                    'The following entries are too short: %s.',
                    count($min_length_error_values)
                ),
                implode(', ', $min_length_error_values),
                $locale->formatNumber(count($min_length_error_values))
            );

            $this->addMessage(new SwatMessage($min_length_msg, 'error'));
        }

        if ($max_length_msg !== null) {
            $max_length_msg .= sprintf(
                Swat::ngettext(
                    'The following entry is too long: %s.',
                    'The following entries are too long: %s.',
                    count($max_length_error_values)
                ),
                implode(', ', $max_length_error_values),
                $locale->formatNumber(count($max_length_error_values))
            );

            $this->addMessage(new SwatMessage($max_length_msg, 'error'));
        }
    }
32061
function (error) {
        if (!this.started) {
            return;
        }

        var errorHandlers = this.errorHandlers,
            length = errorHandlers.length,
            errorHandler,
            errorHandled = false,
            errorString,
            i;

        //Exit handling
        if (error instanceof SystemExit) {
            this._exit(error.code);
            return;
        }

        try {
            for (i = 0; i < length; i += 1) {
                errorHandler = errorHandlers[i];
                errorHandled = !!errorHandler(error);

                if (errorHandled) {
                    return;
                }
            }
        } catch (e) {
            this._printError(e);
            this._exit(1);
        }

        //Default error handling
        errorString = '' + (error.stack || error);
        this._printError(errorString);
        this._exit(1);
    }
482778
public void processError(String msg) {
        synchronized (frameListeners) {
            Iterator<FrameListener> it = frameListeners.iterator();
            while (it.hasNext()) {
                FrameListener listener = it.next();
                listener.processError(msg);
            }
        }
    }