/** * Validate all Fields in this Form on the given page and below. * * @param params A Map of parameter class names to parameter * values to pass into validation methods. * @param actions A Map of validator names to ValidatorAction * objects. * @param page Fields on pages higher than this will not be * validated. * @return A ValidatorResults object containing all * validation messages. * @throws ValidatorException */ ValidatorResults validate(Map<String, Object> params, Map<String, ValidatorAction> actions, int page) throws ValidatorException { return validate(params, actions, page, null); }
/** * Performs validations based on the configured resources. * * @return The <code>Map</code> returned uses the property of the * <code>Field</code> for the key and the value is the number of error the * field had. * @throws ValidatorException If an error occurs during validation */ public ValidatorResults validate() throws ValidatorException { Locale locale = (Locale) this.getParameterValue(LOCALE_PARAM); if (locale == null) { locale = Locale.getDefault(); } this.setParameter(VALIDATOR_PARAM, this); Form form = this.resources.getForm(locale, this.formName); if (form != null) { this.setParameter(FORM_PARAM, form); return form.validate( this.parameters, this.resources.getValidatorActions(), this.page, this.fieldName); } return new ValidatorResults(); }
/** * Validate all Fields in this Form on the given page and below. * * @param params A Map of parameter class names to parameter * values to pass into validation methods. * @param actions A Map of validator names to ValidatorAction * objects. * @param page Fields on pages higher than this will not be * validated. * @return A ValidatorResults object containing all * validation messages. * @throws ValidatorException */ ValidatorResults validate(Map params, Map actions, int page) throws ValidatorException { return validate(params, actions, page, null); }
/** * Validate all Fields in this Form on the given page and below. * * @param params A Map of parameter class names to parameter * values to pass into validation methods. * @param actions A Map of validator names to ValidatorAction * objects. * @param page Fields on pages higher than this will not be * validated. * @return A ValidatorResults object containing all * validation messages. * @throws ValidatorException */ ValidatorResults validate(Map<String, Object> params, Map<String, ValidatorAction> actions, int page) throws ValidatorException { return validate(params, actions, page, null); }
/** * Performs validations based on the configured resources. * * @return The <code>Map</code> returned uses the property of the * <code>Field</code> for the key and the value is the number of error the * field had. * @throws ValidatorException If an error occurs during validation */ public ValidatorResults validate() throws ValidatorException { Locale locale = (Locale) this.getParameterValue(LOCALE_PARAM); if (locale == null) { locale = Locale.getDefault(); } this.setParameter(VALIDATOR_PARAM, this); Form form = this.resources.getForm(locale, this.formName); if (form != null) { this.setParameter(FORM_PARAM, form); return form.validate( this.parameters, this.resources.getValidatorActions(), this.page, this.fieldName); } return new ValidatorResults(); }
/** * Performs validations based on the configured resources. * * @return The <code>Map</code> returned uses the property of the * <code>Field</code> for the key and the value is the number of error the * field had. * @throws ValidatorException If an error occurs during validation */ @GwtIncompatible("incompatible method") public ValidatorResults validate() throws ValidatorException { Locale locale = (Locale) this.getParameterValue(LOCALE_PARAM); if (locale == null) { locale = Locale.getDefault(); } this.setParameter(VALIDATOR_PARAM, this); Form form = this.resources.getForm(locale, this.formName); if (form != null) { this.setParameter(FORM_PARAM, form); return form.validate( this.parameters, this.resources.getValidatorActions(), this.page, this.fieldName); } return new ValidatorResults(); }