Merge branch '1.1.x'
This commit is contained in:
@@ -38,7 +38,7 @@ class RegexPatterns {
|
||||
protected static final Pattern NUMBER = Pattern.compile('-?\\d*(\\.\\d+)?')
|
||||
protected static final Pattern IP_ADDRESS = Pattern.compile('([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])')
|
||||
protected static final Pattern HOSTNAME_PATTERN = Pattern.compile('((http[s]?|ftp):/)/?([^:/\\s]+)(:[0-9]{1,5})?')
|
||||
protected static final Pattern EMAIL = Pattern.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}')
|
||||
protected static final Pattern EMAIL = Pattern.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}')
|
||||
protected static final Pattern URL = UrlHelper.URL
|
||||
protected static final Pattern UUID = Pattern.compile('[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}')
|
||||
protected static final Pattern ANY_DATE = Pattern.compile('(\\d\\d\\d\\d)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])')
|
||||
|
||||
@@ -53,6 +53,7 @@ class RegexPatternsSpec extends Specification {
|
||||
textToMatch || shouldMatch
|
||||
'asd@asd.com' || true
|
||||
'a.b.' || false
|
||||
'asdf@asdf.online' || true
|
||||
}
|
||||
|
||||
// @see http://formvalidation.io/validators/uri/
|
||||
|
||||
Reference in New Issue
Block a user