Skip to content

Commit

Permalink
fix: email validation regex updated (#17)
Browse files Browse the repository at this point in the history
* fix: email validation regex updated

* chore: user_v2 minimal test updated
  • Loading branch information
marnas authored Nov 4, 2024
1 parent ecc548f commit 8a28cc4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/provider/user_v2_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestAccUserV2Minimal(t *testing.T) {
{
Config: providerConfig + test.TestAccTestdata(t, "user_v2_resource_minimal.tf"),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("conduktor_user_v2.minimal", "name", "angela.martin@dunder.mifflin.com"),
resource.TestCheckResourceAttr("conduktor_user_v2.minimal", "name", "angela.martin@dunder-mifflin.com"),
resource.TestCheckResourceAttr("conduktor_user_v2.minimal", "spec.permissions.#", "0"),
),
},
Expand Down
2 changes: 1 addition & 1 deletion internal/schema/resource_user_v2/user_v2_resource_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/testdata/user_v2_resource_minimal.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

resource "conduktor_user_v2" "minimal" {
name = "angela.martin@dunder.mifflin.com"
name = "angela.martin@dunder-mifflin.com"
spec {
}
}
2 changes: 1 addition & 1 deletion provider_code_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"path": "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
}
],
"schema_definition": "stringvalidator.RegexMatches(regexp.MustCompile(\"^([\\\\w\\\\-_.]*[^.])(@\\\\w+)(\\\\.\\\\w+(\\\\.\\\\w+)?[^.\\\\W])$\"), \"\")"
"schema_definition": "stringvalidator.RegexMatches(regexp.MustCompile(\"^([\\\\w\\\\-_.]*[^.])@([\\\\w-]+\\\\.)+[\\\\w-]{2,4}$\"), \"\")"
}
}
]
Expand Down

0 comments on commit 8a28cc4

Please sign in to comment.