Back to project page Android-sample.
The source code is released under:
Apache License
If you think the Android project Android-sample listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.andreabaccega.formedittextvalidator; //from ww w.java 2 s.com import java.util.regex.Pattern; import android.os.Build; import android.util.Patterns; public class DomainValidator extends PatternValidator{ public DomainValidator(String _customErrorMessage) { //TODO: Fix the pattern for api level < 8 super(_customErrorMessage, Build.VERSION.SDK_INT>=8?Patterns.DOMAIN_NAME:Pattern.compile(".*")); } }