function ConfigValidation::validateGiraffes
Validates giraffes.
Parameters
string $string: The string to validate.
\Symfony\Component\Validator\Context\ExecutionContextInterface $context: The validation execution context.
File
- 
              core/
modules/ config/ tests/ config_test/ src/ ConfigValidation.php, line 62  
Class
- ConfigValidation
 - Provides a collection of validation callbacks for testing purposes.
 
Namespace
Drupal\config_testCode
public static function validateGiraffes($string, ExecutionContextInterface $context) {
  if (strpos($string, 'hum') !== 0) {
    $context->addViolation('Giraffes just hum');
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.