Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2014 at 20:13 UTC
Updated:
9 Oct 2014 at 05:10 UTC
Jump to comment: Most recent
#2336443: NumericItemBase uses '#type' => 'textfield' for numeric 'min' and 'max' form fields
Commit message: Issue #2336443 by drunken monkey: NumericItemBase uses '#type' => 'textfield' for numeric 'min' and 'max' form fields.
Initially raised by @drunken monkey at #2326891-35: Convert system_element_info() to Element classes
\Drupal\Core\Field\Plugin\Field\FieldType\NumericItemBase uses element type 'textfield' and 'form_validate_number' as #element_validate callback for the 'min' and 'max' form fields. Since these are actually numbers, the 'number' element type should be used.
Use '#type' => 'number' for the 'min' and 'max' form fields.
Patch
Reviews
Commit
None
None
| Comment | File | Size | Author |
|---|---|---|---|
| numeric_item_base.patch | 1.22 KB | almaudoh |
Comments
Comment #1
almaudoh commentedComment #2
swentel commentedWe can't remove the validate - however, this function does not exist anymore, but needs to be replace, see #2332685: form_validate_number is still refered too
Comment #3
swentel commentedActually, I might be wrong, let me investigate first.
Comment #4
clemens.tolboomComment #5
almaudoh commented@swentel, during refactoring of #2326891: Convert system_element_info() to Element classes
form_validate_number()was converted toNumber::validateNumber()and is the'number'element's default'#element_validate'callback, so doesn't need to be explicitly mentioned.Comment #6
swentel commentedIndeed it is.
Comment #7
alexpottCommitted 22bb037 and pushed to 8.0.x. Thanks!
Comment #9
almaudoh commented