Validation Package Testing

- Added More Unit Tests to Validation Classes
- Updated Logic accordingly
This commit is contained in:
japatel
2015-01-09 16:56:38 -06:00
parent 095ab24b62
commit f7cfd0faa9
6 changed files with 170 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ class JsonValidator
*/
public static function validate($string, $silent = false)
{
json_decode($string);
@json_decode($string);
if (json_last_error() != JSON_ERROR_NONE) {
if ($silent == false) {
//Throw an Exception for string or array