mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-06 13:15:49 -06:00
FEATURE character validation
This commit is contained in:
@@ -180,6 +180,14 @@ class _ScannerPageState extends State<ScannerPage>
|
||||
.of(context)!
|
||||
.thisFieldIsRequired;
|
||||
}
|
||||
if (value?.trim().contains(
|
||||
RegExp(
|
||||
r'[<>:"/|?*]')) ??
|
||||
true) {
|
||||
return S
|
||||
.of(context)!
|
||||
.invalidFilenameCharacter;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
@@ -326,7 +334,6 @@ class _ScannerPageState extends State<ScannerPage>
|
||||
|
||||
await cubit.saveLocally(
|
||||
file.bytes, fileName, globalSettings.preferredLocaleSubtag);
|
||||
_downloadFormKey.currentState!.save();
|
||||
} catch (error) {
|
||||
showGenericError(context, error);
|
||||
}
|
||||
|
||||
@@ -815,5 +815,9 @@
|
||||
"export": "Export",
|
||||
"@export": {
|
||||
"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": {
|
||||
"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