Package org.camunda.bpm.engine.impl.form.validator

Examples of org.camunda.bpm.engine.impl.form.validator.FormValidators


public class BuiltInValidatorsTest extends PluggableProcessEngineTestCase {

  public void testDefaultFormFieldValidators() {

    // assert default validators are registered
    FormValidators formValidators = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration().getFormValidators();

    Map<String, Class<? extends FormFieldValidator>> validators = formValidators.getValidators();
    assertEquals(RequiredValidator.class, validators.get("required"));
    assertEquals(ReadOnlyValidator.class, validators.get("readonly"));
    assertEquals(MinValidator.class, validators.get("min"));
    assertEquals(MaxValidator.class, validators.get("max"));
    assertEquals(MaxLengthValidator.class, validators.get("maxlength"));
View Full Code Here


    }
  }

  protected void initFormFieldValidators() {
    if(formValidators == null) {
      formValidators = new FormValidators();
      formValidators.addValidator("min", MinValidator.class);
      formValidators.addValidator("max", MaxValidator.class);
      formValidators.addValidator("minlength", MinLengthValidator.class);
      formValidators.addValidator("maxlength", MaxLengthValidator.class);
      formValidators.addValidator("required", RequiredValidator.class);
View Full Code Here

    }
  }

  protected void initFormFieldValidators() {
    if(formValidators == null) {
      formValidators = new FormValidators();
      formValidators.addValidator("min", MinValidator.class);
      formValidators.addValidator("max", MaxValidator.class);
      formValidators.addValidator("minlength", MinLengthValidator.class);
      formValidators.addValidator("maxlength", MaxLengthValidator.class);
      formValidators.addValidator("required", RequiredValidator.class);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.form.validator.FormValidators

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.