function AllowedValuesConstraintValidatorTest::allowedValueCallback
Same name in other branches
- 8.9.x 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 99
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.