Skip to content

Commit

Permalink
Add support for "validatable" flag on Property
Browse files Browse the repository at this point in the history
Related to locomotivemtl/charcoal-property:ebc60fb4
  • Loading branch information
mcaskill committed Nov 21, 2019
1 parent 9276eeb commit d6b656f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Charcoal/Model/ModelValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public function validate()
continue;
}

if (isset($prop['validatable']) && !$prop['validatable']) {
continue;
}

$value = $model->propertyValue($ident);
$isValid = $prop->setVal($value)->validate();
$prop->clearVal();
Expand Down

0 comments on commit d6b656f

Please sign in to comment.