Formats javascript assignment for form validation api
with proper escaping of a value.
public static getJsValueForFormValidation ( string $key, string $value, boolean $addOn, boolean $comma ) : string | ||
$key | string | Name of value to set |
$value | string | Value to set |
$addOn | boolean | Check if $.validator.format is required or not |
$comma | boolean | Check if comma is required |
return | string | Javascript code. |