static function validate($schema, $value, $helper = NULL) {
    foreach (self::parseConstraints($schema) as $c) {  // The constraints are in a numeric array as the order matters.
      $constraint = key($c);
      $params     = $c[$constraint];

      if (self::isBlank($value) && ! preg_match('/require|notblank/i', $constraint)) continue; // Only *require* validators should check blank values.

      $value = self::constrain($value, $constraint, self::parseParams($params, $schema), $helper);
    }

    return $value;
  }