Skip to content

Commit 7ee8ab4

Browse files
committed
fix: add trim on required field validation
1 parent 27164b6 commit 7ee8ab4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Shared/validations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const MESSAGES = {
3434
const MAX_DESCRIPTION_LENGTH = 350
3535

3636
export const requiredField = (value: string): ValidationResponseType => {
37-
if (!value) {
37+
if (!value?.trim()) {
3838
return { message: 'This field is required', isValid: false }
3939
}
4040
return { isValid: true }

0 commit comments

Comments
 (0)