diff --git a/ftl/core/fields.ftl b/ftl/core/fields.ftl index 1f3bd6a5e..1e2a002b4 100644 --- a/ftl/core/fields.ftl +++ b/ftl/core/fields.ftl @@ -12,4 +12,5 @@ fields-reverse-text-direction-rtl = Reverse text direction (RTL) fields-size = Size: fields-sort-by-this-field-in-the = Sort by this field in the browser fields-that-field-name-is-already-used = That field name is already used. -fields-name-first-letter-not-valid = The field name should not start with #, ^ or /. \ No newline at end of file +fields-name-first-letter-not-valid = The field name should not start with #, ^ or /. +fields-name-invalid-letter = The field name should not contain :, ", { or }. diff --git a/qt/aqt/fields.py b/qt/aqt/fields.py index 06f40b9a5..2cd977c3d 100644 --- a/qt/aqt/fields.py +++ b/qt/aqt/fields.py @@ -88,6 +88,10 @@ class FieldDialog(QDialog): if txt[0] in "#^/": showWarning(tr(TR.FIELDS_NAME_FIRST_LETTER_NOT_VALID)) return + for letter in """:{"}""": + if letter in txt: + showWarning(tr(TR.FIELDS_NAME_INVALID_LETTER)) + return for f in self.model["flds"]: if ignoreOrd is not None and f["ord"] == ignoreOrd: continue