- 
                Notifications
    You must be signed in to change notification settings 
- Fork 16
String Rules
        Alexandre DuBreuil edited this page Aug 22, 2018 
        ·
        2 revisions
      
    See javadoc for StringCondition.
The field accountEmail is of type StringFieldInfo that delegates the
validation to StringCondition.
package io.doov.sample.validation;
import static io.doov.sample.field.dsl.DslSampleModel.accountAccepted;
public interface SampleRules {
    // Validates email is accepted
    ValidationRule RULE_EMAIL = DslModel
        .when(accountEmail.matches("\\w+[@]\\w+\\.com"))
        .validate();
}