Validates the current value of the view in order to retrieve the error message and icon,
which should be shown at the right edge of the view, if a validation fails.

@return The validator, which failed or null, if the validation succeeded
349121
private Validator<ValueType> validateRight() {
        Validator<ValueType> result = null;
        Collection<Validator<ValueType>> subValidators = onGetRightErrorMessage();

        if (subValidators != null) {
            for (Validator<ValueType> validator : subValidators) {
                notifyOnValidationFailure(validator);

                if (result == null) {
                    result = validator;
                }
            }
        }

        return result;
    }
116281
public Boolean validate(GraphValidator<K, VV, EV> validator) throws Exception {
		return validator.validate(this);
	}
563721
private Calendar getValidFrom() {

        // Get valid from date
        Date validFrom = getModel().getValidFrom();
        if (validFrom == null)
            return null;

        // Convert to midnight within defined time zone
        Calendar validFromCalendar = Calendar.getInstance(getTimeZone());
        validFromCalendar.setTime(validFrom);
        validFromCalendar.set(Calendar.HOUR_OF_DAY, 0);
        validFromCalendar.set(Calendar.MINUTE,      0);
        validFromCalendar.set(Calendar.SECOND,      0);
        validFromCalendar.set(Calendar.MILLISECOND, 0);
        return validFromCalendar;

    }
255032
public Object getValue() {
        final String currentPath = getCurrentPath();
        if(Utils.isEmpty(currentPath)) {
            return target;
        } else {
            return propertyValueNavigator.getProperty(target, currentPath);
        }
    }
838999
public static Validator getExperimentalValidator() {
        return CascadingValidator.create(
                ParenthesesValidator.INSTANCE,
                ConfigurableValidator.create(ValidatorConfiguration.createExperimental()));
    }
1302979
public IValidator appendError(IValidator validator) {
		if (validator == null) return this;
		if (! (validator instanceof WebValidator) ) {
			throw new IllegalArgumentException("Must WebValidator.");
		}
		
		WebValidator valid = (WebValidator) validator;
		if (valid.isSuccess())
			return this;
		if (this.success) {
			this.msg = valid.msg;
			this.success = valid.success;
		} else {
			msg.append("<br>").append(valid.getMsg());
		}
		return this;
	}
353858
private static MessageInterpolator getMessageInterpolatorFromValidator(Validator validator) {
        
        if(!(validator instanceof ValidatorImpl)) {
            return null;
        }
        
        try {
            Field field = ValidatorImpl.class.getDeclaredField("messageInterpolator");
            field.setAccessible(true);
            
            MessageInterpolator interpolator = (MessageInterpolator)field.get(validator);
            return interpolator;
            
        } catch (IllegalAccessException | NoSuchFieldException | SecurityException e) {
            throw new IllegalStateException("fail reflect MessageInterpolrator from ValidatorImpl.", e);
        }
        
    }
52130
public static FormValidation validateRequired(String value) {
        if (Util.fixEmptyAndTrim(value) == null)
            return error(Messages.FormValidation_ValidateRequired());
        return ok();
    }
501258
@JsonIgnore
    public String getErrorMessage() {
        return (params.length == 0) ? exceptionCode.getMessageTemplate() :
                String.format(exceptionCode.getMessageTemplate(), params);
    }
1102885
@Override
    protected Validator createValidator() throws JspException
    {
        if (null == _minimum && null == _maximum)
        {
            throw new JspException("a minimum and / or a maximum have to be specified");
        }
        ELContext elContext = FacesContext.getCurrentInstance().getELContext();
        if (null != _minimum)
        {
            _min = getValue(_minimum.getValue(elContext));
        }
        if (null != _maximum)
        {
            _max = getValue(_maximum.getValue(elContext));
        }
        if (null != _minimum && null != _maximum)
        {
            if (!isMinLTMax())
            {
                throw new JspException("maximum limit must be greater than the minimum limit");
            }
        }
        return super.createValidator();
    }
764323
public java.lang.String getErrorStyle() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.errorStyle);

    }
732371
@Override
    public boolean validate() {
        for (ValidatorBase validator : validators) {
            // source control must be set to allow validators re-usability
            validator.setSrcControl(control);
            validator.validate();
            if (validator.getHasErrors()) {
                activeValidator.set(validator);
                return false;
            }
        }
        activeValidator.set(null);
        return true;
    }
464942
public Problems validate() {
        if (problems == null) {
            SimpleProblems problems = new SimpleProblems();
            warnUseOfDeprecatedFields(problems);
            Results results = SCHEMA_LIBRARY.validate(doc, JSON_SCHEMA_URI);
            for (Problem problem : results) {
                switch (problem.getType()) {
                    case ERROR:
                        problems.addError(JcrI18n.configurationError, problem.getPath(), problem.getReason());
                        break;
                    case WARNING:
                        problems.addWarning(JcrI18n.configurationWarning, problem.getPath(), problem.getReason());
                        break;
                }
            }
            // Validate the components ...
            getSecurity().validateCustomProviders(problems);
            getSequencing().validateSequencers(problems);
            getTextExtraction().validateTextExtractors(problems);
            validateIndexProviders(problems);
            getIndexes().validateIndexDefinitions(problems);
            this.problems = problems;
        }
        return problems;
    }
716448
public static FormValidation error(String message) {
        return errorWithMarkup(message==null?null: Util.escape(message));
    }
244758
public String value() {
        if (!element.is().present() || !element.is().input()) {
            return null;
        }
        WebElement webElement = element.getWebElement();
        return webElement.getAttribute(VALUE);
    }
551610
@Api
	public GeometryValidationState getState() {
		if (violations.isEmpty()) {
			return GeometryValidationState.VALID;
		} else {
			return violations.get(0).getState();
		}
	}
730782
protected<T, C extends Collection<T>> ParamListValidator<T, C> getListValidator(ParamValidator<T> validator) {

        if (validator == null) {
            return null;
        }

        return new ParamListValidator<T, C>(validator);
    }