Skip to content

Commit d7e3a9f

Browse files
th3heroCopilot
andauthored
Added to validate no white space must consider as a value in string.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 74010fb commit d7e3a9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const validateInput = async (
6161
break;
6262
}
6363
case 'required':
64-
if (value === null || value === undefined || (typeof value === 'string' && value === '')) {
64+
if (value === null || value === undefined || (typeof value === 'string' && value.trim() === '')) {
6565
errors[field] = `${field} is required`;
6666
}
6767
break;

0 commit comments

Comments
 (0)