Skip to content

Commit

Permalink
An email is a string, not much else.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-s committed Dec 15, 2015
1 parent f791815 commit 73ef463
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/JsonSchema/Constraints/TypeConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ protected function validateType($value, $type)
if ('string' === $type) {
return is_string($value);
}

if ('email' === $type) {
return is_string($value);
}

if ('null' === $type) {
return is_null($value);
Expand Down

0 comments on commit 73ef463

Please sign in to comment.