Skip to content

Commit

Permalink
Fix behavior string validation, it should allow whitespace padding
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Sep 26, 2024
1 parent e720702 commit 4215786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphile-build/graphile-build/src/behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ export function isValidBehaviorString(
): behavior is GraphileBuild.BehaviorString {
return (
typeof behavior === "string" &&
/^[+-]?([a-zA-Z](?:[_:]?[a-zA-Z0-9])+|\*)(?:\s+[+-]?(?:[a-zA-Z]([_:]?[a-zA-Z0-9])+|\*))*$/.test(
/^\s*[+-]?([a-zA-Z](?:[_:]?[a-zA-Z0-9])+|\*)(?:\s+[+-]?(?:[a-zA-Z]([_:]?[a-zA-Z0-9])+|\*))*\s*$/.test(
behavior,
)
);
Expand Down

0 comments on commit 4215786

Please sign in to comment.