fix: Incorporate pattern for thousand and decimal separator to restrict input to only special characters as valid values.

This commit is contained in:
Uros 2023-04-19 18:40:33 +02:00
parent b6b8061b83
commit da21cb6270
1 changed files with 2 additions and 2 deletions

View File

@ -260,7 +260,7 @@ class WC_Settings_General extends WC_Settings_Page {
'type' => 'text',
'desc_tip' => true,
'custom_attributes' => array(
'pattern' => '^[^a-zA-Z0-9]*([ ]|[^a-zA-Z0-9])[^a-zA-Z0-9]*$',
'pattern' => '[^a-zA-Z\d]{1}',
),
),
@ -273,7 +273,7 @@ class WC_Settings_General extends WC_Settings_Page {
'type' => 'text',
'desc_tip' => true,
'custom_attributes' => array(
'pattern' => '^[^a-zA-Z0-9]*([ ]|[^a-zA-Z0-9])[^a-zA-Z0-9]*$',
'pattern' => '[^a-zA-Z\d]{1}',
),
),