Package com.vaadin.data.validator

Examples of com.vaadin.data.validator.AbstractStringValidator


        // Postal code that must be 5 digits (10000-99999).
        tf = new TextField("Postal Code");
        tf.setColumns(5);

        // Create the validator - this would be even easier with RegexpValidator
        Validator postalCodeValidator = new AbstractStringValidator(
                "Postal code must be a number 10000-99999.") {
            @Override
            protected boolean isValidValue(String value) {
                return value.matches("[1-9][0-9]{4}");
            }
View Full Code Here

TOP

Related Classes of com.vaadin.data.validator.AbstractStringValidator

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.