/**
* Add unobtrusive JavaScript support for form validation.
*
* To enable form validation the form tag must have class="form-validate".
* Each field that needs to be validated needs to have class="validate".
* Additional handlers can be added to the handler for username, password,
* numeric and email. To use these add class="validate-email" and so on.
*
* @return void
*
* @since 3.4
* @deprecated 5.0 Use the script directly
*/
public static function formvalidator()
{
// Only load once
if (isset(static::$loaded[__METHOD__])) {
return;
}
Factory::getDocument()->getWebAssetManager()->useScript('form.validate');
static::$loaded[__METHOD__] = true;
}