From ffcade693fab304cc663d4e71de8ef3938afc8b6 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Wed, 22 May 2024 13:14:44 +1200 Subject: [PATCH] MNT Use an EmailField so field validation is triggered in behat --- 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;