Display an error message when the validataion of a radio input fails because user...
authorHuji Lee <huji.huji@gmail.com>
Sun, 11 Sep 2016 23:38:59 +0000 (19:38 -0400)
committerHuji Lee <huji.huji@gmail.com>
Sun, 11 Sep 2016 23:47:55 +0000 (19:47 -0400)
Bug: T107486
Change-Id: Ie3a9cc11f285cadec1dde32f820643d1aabd0d1b

includes/htmlform/fields/HTMLRadioField.php

index e5b5e68..c884b81 100644 (file)
@@ -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() );