fuel / validation

FuelPHP Framework - Data Validation library
70 stars 14 forks source link

Weird Required rule #39

Closed sagikazarmark closed 10 years ago

sagikazarmark commented 10 years ago

According to a comment in Required rule's if: This check will only be performed if $field and $allFields are set. However the first condition is $field === null which obviously means it is not set.

emlynwest commented 10 years ago

If the value is null then no value has been specified for that field and therefore the rule should fail. It's most likely that the comment needs updating to reflect this.

sagikazarmark commented 10 years ago

On this line it is not the value what is checked.

emlynwest commented 10 years ago

Yes because if there's no data or the field is not in the data it should fail.