function RequiredConstraint::getCompositeOptionStatic
Returns the name of the property or properties that contain constraints.
This method should be a static implementation of Composite::getCompositeOption().
Return value
array|string The name of the property or properties that contain constraints.
Overrides CompositeConstraintInterface::getCompositeOptionStatic
File
-
core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ RequiredConstraint.php, line 30
Class
- RequiredConstraint
- Marks a field as required in a Collection constraint.
Namespace
Drupal\Core\Validation\Plugin\Validation\ConstraintCode
public static function getCompositeOptionStatic() : array|string {
return 'constraints';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.