fix: add regex check on blur

This commit is contained in:
Arman committed 2024-06-04 10:38:48 +02:00
1 parent f4e2a0174b
commit da1ec97876
1 file changed
+4
+4
View File
@@ -51,6 +51,10 @@
};
const addValue = () => {
if (validityRegex && !validityRegex.test(value)) {
error = validityMessage ? validityMessage : 'Invalid value';
return;
}
let tag = value.trim();
if (tag.length === 0 || tags.includes(tag)) return;