-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Json schema spec says URLs are validated as per RFC-3986, but PHP's FILTER_VALIDATE_URL can't cope with relative path references, which are explicitly allowed. See https://tools.ietf.org/html/rfc3986#section-4.2 for further information.
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,9 @@ public function getValidFormats() | |
array('555 320 1212', 'phone'), | ||
|
||
array('http://bluebox.org', 'uri'), | ||
array('//bluebox.org', 'uri'), | ||
array('/absolutePathReference/', 'uri'), | ||
array('relativePathReference/', 'uri'), | ||
|
||
array('[email protected]', 'email'), | ||
|
||
|
@@ -175,6 +178,7 @@ public function getInvalidFormats() | |
array('1 123 4424', 'phone'), | ||
|
||
array('htt:/bluebox.org', 'uri'), | ||
array('', 'uri'), | ||
|
||
array('info@somewhere', 'email'), | ||
|
||
|