From 1e7b73bb06445754b357c9874af77c3533c230a0 Mon Sep 17 00:00:00 2001 From: Huji Lee Date: Sun, 11 Sep 2016 19:38:59 -0400 Subject: [PATCH] Display an error message when the validataion of a radio input fails because user did not provide any input. Bug: T107486 Change-Id: Ie3a9cc11f285cadec1dde32f820643d1aabd0d1b --- includes/htmlform/fields/HTMLRadioField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/htmlform/fields/HTMLRadioField.php b/includes/htmlform/fields/HTMLRadioField.php index e5b5e68f20..c884b81b37 100644 --- a/includes/htmlform/fields/HTMLRadioField.php +++ b/includes/htmlform/fields/HTMLRadioField.php @@ -12,7 +12,7 @@ class HTMLRadioField extends HTMLFormField { } if ( !is_string( $value ) && !is_int( $value ) ) { - return false; + return $this->msg( 'htmlform-required' )->parse(); } $validOptions = HTMLFormField::flattenOptions( $this->getOptions() ); -- 2.20.1