Skip to content

Commit

Permalink
feat: only allow for null values
Browse files Browse the repository at this point in the history
  • Loading branch information
NFSS10 committed Jun 15, 2021
1 parent 8e43ddd commit 3dce1b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/util/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const stringEq = function(valueC, message = "Must be exactly %{1} charact

export const all = function(validation) {
const _validation = (sequence, ctx) => {
if (!Array.isArray(sequence)) return true;
if (sequence === null) return true;
for (const value of sequence) {
validation(value, ctx);
}
Expand Down

0 comments on commit 3dce1b4

Please sign in to comment.