Back to project page android-edittext-validator.
The source code is released under:
MIT License
If you think the Android project android-edittext-validator 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 www .java 2 s. c o m*/ import java.util.regex.Pattern; import android.os.Build; import android.util.Patterns; /** * Validates a web url in the format: * scheme + authority + path * @author Andrea Baccega <me@andreabaccega.com> * */ public class WebUrlValidator extends PatternValidator { public WebUrlValidator(String _customErrorMessage) { //TODO: Fix the pattern for api level < 8 super(_customErrorMessage, Build.VERSION.SDK_INT>=8?Patterns.WEB_URL:Pattern.compile(".*")); } }