function AllowedValuesConstraintValidatorTest::allowedValueCallback
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php \Drupal\KernelTests\Core\TypedData\AllowedValuesConstraintValidatorTest::allowedValueCallback()
- 10 core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php \Drupal\KernelTests\Core\TypedData\AllowedValuesConstraintValidatorTest::allowedValueCallback()
- 11.x core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php \Drupal\KernelTests\Core\TypedData\AllowedValuesConstraintValidatorTest::allowedValueCallback()
An AllowedValueConstraint callback.
Return value
string[] A list of allowed values.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ TypedData/ AllowedValuesConstraintValidatorTest.php, line 96
Class
- AllowedValuesConstraintValidatorTest
- Tests AllowedValues validation constraint with both valid and invalid values.
Namespace
Drupal\KernelTests\Core\TypedDataCode
public static function allowedValueCallback() {
return [
'a',
'b',
'c',
'1',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.