mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-06 17:15:50 -06:00
FEATURE character validation
This commit is contained in:
@@ -180,6 +180,14 @@ class _ScannerPageState extends State<ScannerPage>
|
|||||||
.of(context)!
|
.of(context)!
|
||||||
.thisFieldIsRequired;
|
.thisFieldIsRequired;
|
||||||
}
|
}
|
||||||
|
if (value?.trim().contains(
|
||||||
|
RegExp(
|
||||||
|
r'[<>:"/|?*]')) ??
|
||||||
|
true) {
|
||||||
|
return S
|
||||||
|
.of(context)!
|
||||||
|
.invalidFilenameCharacter;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@@ -326,7 +334,6 @@ class _ScannerPageState extends State<ScannerPage>
|
|||||||
|
|
||||||
await cubit.saveLocally(
|
await cubit.saveLocally(
|
||||||
file.bytes, fileName, globalSettings.preferredLocaleSubtag);
|
file.bytes, fileName, globalSettings.preferredLocaleSubtag);
|
||||||
_downloadFormKey.currentState!.save();
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showGenericError(context, error);
|
showGenericError(context, error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -815,5 +815,9 @@
|
|||||||
"export": "Export",
|
"export": "Export",
|
||||||
"@export": {
|
"@export": {
|
||||||
"description": "Label for button that exports scanned images to pdf (before upload)"
|
"description": "Label for button that exports scanned images to pdf (before upload)"
|
||||||
|
},
|
||||||
|
"invalidFilenameCharacter": "Invalid filename character found",
|
||||||
|
"@invalidFilenameCharacter": {
|
||||||
|
"description": "For validating filename in export dialogue"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -815,5 +815,9 @@
|
|||||||
"export": "Eksport",
|
"export": "Eksport",
|
||||||
"@export": {
|
"@export": {
|
||||||
"description": "Label for button that exports scanned images to pdf (before upload)"
|
"description": "Label for button that exports scanned images to pdf (before upload)"
|
||||||
|
},
|
||||||
|
"invalidFilenameCharacter": "Znaleziono niedozwolony znak w nazwie pliku",
|
||||||
|
"@invalidFilenameCharacter": {
|
||||||
|
"description": "For validating filename in export dialogue"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user