21099 api serverside validation check

This commit is contained in:
2026-01-21 13:17:03 +00:00
parent e0392b108c
commit dd12dc99da
3 changed files with 38 additions and 50 deletions
@@ -1087,7 +1087,7 @@ export const RenderFileUpload = (field) => {
setRejectedFiles([]); // Clear any previously rejected file errorsss
};
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-()]+$/;
const FILENAME_ALLOWED = /^[A-Za-z0-9 ._\-:()]+$/;
const validateFilename = (file, t) => {
const name = file.name;
@@ -1112,8 +1112,8 @@ export const RenderFileUpload = (field) => {
};
}
// block characters < > : " / \ | ? *
if (/[<>:"/\\|?*]/.test(name)) {
// block characters < > " / \ | ? *
if (/[<>"/\\|?*]/.test(name)) {
return {
code: "filename-invalid-chars",
message: `${name} ${t(