From 2ad0ed93c161a0864846f33e1f82ac0661a48483 Mon Sep 17 00:00:00 2001 From: Jonas Hungershausen Date: Wed, 10 Jul 2024 15:39:26 +0200 Subject: [PATCH] chore: remove max length --- ...l_the_correct_verification_payloads_after_submission.json | 2 -- selfservice/strategy/code/strategy.go | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/selfservice/strategy/code/.snapshots/TestVerification-description=should_set_all_the_correct_verification_payloads_after_submission.json b/selfservice/strategy/code/.snapshots/TestVerification-description=should_set_all_the_correct_verification_payloads_after_submission.json index fde2aae2986..7e7096cd735 100644 --- a/selfservice/strategy/code/.snapshots/TestVerification-description=should_set_all_the_correct_verification_payloads_after_submission.json +++ b/selfservice/strategy/code/.snapshots/TestVerification-description=should_set_all_the_correct_verification_payloads_after_submission.json @@ -19,9 +19,7 @@ "name": "code", "type": "text", "required": true, - "pattern": "[0-9]+", "disabled": false, - "maxlength": 6, "node_type": "input" }, "messages": [], diff --git a/selfservice/strategy/code/strategy.go b/selfservice/strategy/code/strategy.go index 351949f7cd9..2d275fdff85 100644 --- a/selfservice/strategy/code/strategy.go +++ b/selfservice/strategy/code/strategy.go @@ -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