We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 271b1d6 commit 4523c2bCopy full SHA for 4523c2b
Client Scripts/Validate Short Description/Readme.md
@@ -0,0 +1 @@
1
+Effectively validates the short description field ensuring data quality and preventing invalid input.
Client Scripts/Validate Short Description/validateSpecialChar.js
@@ -0,0 +1,12 @@
+// Client Script to Validate Special Charecters
2
+function onSubmit() {
3
+ var shortDescription = g_form.getValue('short_description');
4
+ var specialCharsRegex = /[^a-zA-Z0-9\s]/g;
5
+var specialChars = description.match(specialCharsRegex);
6
+ if (specialChars) {
7
+ alert('Description contains invalid characters: ' + specialChars.join(', '));
8
+ return false;
9
+ } else {
10
+ return true;
11
+ }
12
+
0 commit comments