Skip to content

Commit

Permalink
chore: remove max length
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas authored and aeneasr committed Jul 11, 2024
1 parent f125f7f commit 2ad0ed9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
"name": "code",
"type": "text",
"required": true,
"pattern": "[0-9]+",
"disabled": false,
"maxlength": 6,
"node_type": "input"
},
"messages": [],
Expand Down
5 changes: 1 addition & 4 deletions selfservice/strategy/code/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,7 @@ func (s *Strategy) populateEmailSentFlow(ctx context.Context, f flow.Flow) error
)

// code input field
freshNodes.Upsert(node.NewInputField("code", nil, node.CodeGroup, node.InputAttributeTypeText, node.WithRequiredInputAttribute, node.WithInputAttributes(func(a *node.InputAttributes) {
a.Pattern = "[0-9]+"
a.MaxLength = CodeLength
})).
freshNodes.Upsert(node.NewInputField("code", nil, node.CodeGroup, node.InputAttributeTypeText, node.WithRequiredInputAttribute).
WithMetaLabel(codeMetaLabel))

// code submit button
Expand Down

0 comments on commit 2ad0ed9

Please sign in to comment.