From: Huji Lee Date: Sun, 11 Sep 2016 23:38:59 +0000 (-0400) Subject: Display an error message when the validataion of a radio input fails because user... X-Git-Tag: 1.31.0-rc.0~5660^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=1e7b73bb06445754b357c9874af77c3533c230a0;p=lhc%2Fweb%2Fwiklou.git Display an error message when the validataion of a radio input fails because user did not provide any input. Bug: T107486 Change-Id: Ie3a9cc11f285cadec1dde32f820643d1aabd0d1b --- 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() );