All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.itranswarp.jsonstream.format.Alpha Maven / Gradle / Ivy

package com.itranswarp.jsonstream.format;

import java.util.regex.Pattern;

/**
 * Validate a string contains only alpha characters (a-z, A-Z).
 * 
 * @author Michael Liao
 */
public class Alpha implements StringFormat {

    Pattern pattern = Pattern.compile("^[a-zA-Z]+$");

    @Override
    public boolean validate(String value) {
        return pattern.matcher(value).matches();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy