X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLIntField.php;h=b0148d987e4ea628bd2229ce8e0b011804fb96f3;hb=c762b6899bbf64ecf7cb56ffdeab504a59e45ea4;hp=28876e2cf9d853d18ce242634680fc3a1e8df861;hpb=6abd85ca9210551ad8f09d2d2424350fc0b21cb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLIntField.php b/includes/htmlform/HTMLIntField.php index 28876e2cf9..b0148d987e 100644 --- a/includes/htmlform/HTMLIntField.php +++ b/includes/htmlform/HTMLIntField.php @@ -11,14 +11,13 @@ class HTMLIntField extends HTMLFloatField { return $p; } - # http://dev.w3.org/html5/spec/common-microsyntaxes.html#signed-integers + # http://www.w3.org/TR/html5/infrastructure.html#signed-integers # with the addition that a leading '+' sign is ok. Note that leading zeros # are fine, and will be left in the input, which is useful for things like # phone numbers when you know that they are integers (the HTML5 type=tel # input does not require its value to be numeric). If you want a tidier # value to, eg, save in the DB, clean it up with intval(). - if ( !preg_match( '/^((\+|\-)?\d+)?$/', trim( $value ) ) - ) { + if ( !preg_match( '/^((\+|\-)?\d+)?$/', trim( $value ) ) ) { return $this->msg( 'htmlform-int-invalid' )->parseAsBlock(); }