jenkins-bot has submitted this change and it was merged.

Change subject: Display an error message when the validataion of a radio input 
fails because user did not provide any input.
......................................................................


Display an error message when the validataion of a radio input fails because 
user did not provide any input.

Bug: T107486
Change-Id: Ie3a9cc11f285cadec1dde32f820643d1aabd0d1b
---
M includes/htmlform/fields/HTMLRadioField.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/htmlform/fields/HTMLRadioField.php 
b/includes/htmlform/fields/HTMLRadioField.php
index e5b5e68..c884b81 100644
--- a/includes/htmlform/fields/HTMLRadioField.php
+++ b/includes/htmlform/fields/HTMLRadioField.php
@@ -12,7 +12,7 @@
                }
 
                if ( !is_string( $value ) && !is_int( $value ) ) {
-                       return false;
+                       return $this->msg( 'htmlform-required' )->parse();
                }
 
                $validOptions = HTMLFormField::flattenOptions( 
$this->getOptions() );

-- 
To view, visit https://gerrit.wikimedia.org/r/309920
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3a9cc11f285cadec1dde32f820643d1aabd0d1b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Huji <huji.h...@gmail.com>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to