Skip to content

Commit

Permalink
Merge pull request #112 from RyanONeill1970/main
Browse files Browse the repository at this point in the history
Fix for client side 'required' validator which allowed whitespace
  • Loading branch information
haacked authored May 8, 2024
2 parents fd1e5a6 + 5b2129a commit 36a24f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ export class MvcValidationProviders {

return false;
}
// Default behavior otherwise.
return Boolean(value);

// Default behavior otherwise (trim ensures whitespace only is not seen as valid).
return Boolean(value?.trim());
}

/**
Expand Down

0 comments on commit 36a24f1

Please sign in to comment.