8 return isset( $this->mParams[
'size'] ) ? $this->mParams[
'size'] : 20;
12 $p = parent::validate(
$value, $alldata );
21 # with the addition that a leading '+' sign is ok.
22 if ( !preg_match(
'/^((\+|\-)?\d+(\.\d+)?(E(\+|\-)?\d+)?)?$/i',
$value ) ) {
23 return $this->
msg(
'htmlform-float-invalid' );
26 # The "int" part of these message names is rather confusing.
27 # They make equal sense for all numbers.
28 if ( isset( $this->mParams[
'min'] ) ) {
29 $min = $this->mParams[
'min'];
32 return $this->
msg(
'htmlform-int-toolow', $min );
36 if ( isset( $this->mParams[
'max'] ) ) {
37 $max = $this->mParams[
'max'];
40 return $this->
msg(
'htmlform-int-toohigh', $max );
A field that will contain a numeric value.
validate( $value, $alldata)
Override this function to add specific validation checks on the field input.