// Verify that Ajax validation messages are displayed only once.
$this->assertSession()->elementsCount('xpath', '//div[contains(@class, "messages--error")]', 1); }
/**
* Tests that image field validation works with other form submit handlers.
*/ publicfunctiontestFriendlyAjaxValidation(){ // Add a custom field to the Article content type that contains an AJAX