You are here

public static function WebformYaml::isValid in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Utility/WebformYaml.php \Drupal\webform\Utility\WebformYaml::isValid()

Determine if string is valid YAML.

Parameters

string $yaml: A YAML string.

Return value

bool TRUE if string is valid YAML.

1 call to WebformYaml::isValid()
webform_form_locale_translate_edit_form_alter in includes/webform.translation.inc
Implements hook_form_FORM_ID_alter() for locale translate edit form.

File

src/Utility/WebformYaml.php, line 62

Class

WebformYaml
Provides YAML tidy function.

Namespace

Drupal\webform\Utility

Code

public static function isValid($yaml) {
  return self::validate($yaml) ? FALSE : TRUE;
}