Open DanielHreben opened 11 years ago
Validation rules:
my $rules = { some_field => [ 'not_empty' ], };
Input hash:
my $data = { some_field => undef, };
In this case, we must get an error, but validation rule did not see difference between hash with 'some_field' => undef, and hash where 'some_field' not exist
I think we should remove all undfined values from data. So, undef will be treated as not existing field.
Validation rules:
Input hash:
In this case, we must get an error, but validation rule did not see difference between hash with 'some_field' => undef, and hash where 'some_field' not exist