diff --git a/src/components/preview/index.jsx b/src/components/preview/index.jsx
index 6a711e941..05d057417 100644
--- a/src/components/preview/index.jsx
+++ b/src/components/preview/index.jsx
@@ -31,7 +31,7 @@ const Field = ({ title, value }) => {
value && (
{title}:
- {value}
+
{value}
)
)
diff --git a/src/pages/config/Subjkt.tsx b/src/pages/config/Subjkt.tsx
index 863c23282..75856a017 100644
--- a/src/pages/config/Subjkt.tsx
+++ b/src/pages/config/Subjkt.tsx
@@ -266,11 +266,13 @@ export const Subjkt = () => {
value={subjkt}
onChange={setSubjkt}
onBlur={(e) => {
- setSubjkt(e.target.value.replace(/[^a-z0-9-._]/g, ''))
+ if(/[^A-Za-z0-9-._]/.test(e.target.value)) {
+ show('Subjkt contains invalid characters. This field can only contain: letters (a-z A-Z), numbers (0-9), . (dot), - (dash), _ (underscore)')
+ }
}}
- placeholder="can contain letters (a-z), numbers (0-9), . (dot), - (dash), _ (underscore)"
+ placeholder="can contain letters (a-z A-Z), numbers (0-9), . (dot), - (dash), _ (underscore)"
label="Username"
- pattern="^[a-z0-9-._]*$"
+ pattern="^[A-Za-z0-9-._]*$"
/>