From fcf39f1cf9043d3bf6d749008a3c5f6248ac7622 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Wed, 22 May 2024 17:11:21 +1200 Subject: [PATCH] MNT Use an EmailField so field validation is triggered in behat (#180) --- code/multitab-validation/MultiTabPage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/multitab-validation/MultiTabPage.php b/code/multitab-validation/MultiTabPage.php index a0f7b72..91e0eeb 100644 --- a/code/multitab-validation/MultiTabPage.php +++ b/code/multitab-validation/MultiTabPage.php @@ -3,6 +3,7 @@ namespace SilverStripe\FrameworkTest\Model; use Page; +use SilverStripe\Forms\EmailField; use SilverStripe\Forms\RequiredFields; use SilverStripe\Forms\TextField; @@ -29,7 +30,7 @@ public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab("Root.Second", TextField::create("SecondTabFirstField")); - $fields->addFieldToTab("Root.Third", TextField::create("ThirdTabFirstField")); + $fields->addFieldToTab("Root.Third", EmailField::create("ThirdTabFirstField")); $fields->addFieldToTab("Root.Third", TextField::create("ThirdTabSecondField")); $fields->addFieldToTab("Root.Fourth", TextField::create("FourthTabFirstField")); return $fields;