fix: Server side validation for #3112
This commit is contained in:
@@ -36,8 +36,10 @@ export const assertSort = (
|
||||
}
|
||||
};
|
||||
|
||||
export const assertNotEmpty = (value: unknown, message?: string) => {
|
||||
if (value === "") {
|
||||
export const assertNotEmpty = (value: unknown, message: string) => {
|
||||
assertPresent(value, message);
|
||||
|
||||
if (typeof value === "string" && value.trim() === "") {
|
||||
throw ValidationError(message);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user