By wim leers on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.3.x
Introduced in version:
10.3.0
Issue links:
Description:
A new config schema data type, called weight, has been added to core. As the name suggests, this constraint can be used to indicate that not just any integer is allowed, but a integer shaped like a weight.
The default validation constraints can be found in the definition of the new weight data type:
weight:
type: integer
label: 'Weight'
constraints:
Range:
# @see PHP_INT_MIN (32-bit)
min: -2147483648
# @see PHP_INT_MAX (32-bit)
max: 2147483647
FullyValidatable: ~
How to use?
- Before
-
weight: type: integer label: 'Weight' - After
-
weight: type: weight label: 'Weight'
That's it!
Impacts:
Module developers