Validate - normalization rules
The table below provides details on the normalization rules for different data types.
Data type | String | Number | Boolean | Null |
---|---|---|---|---|
String | -- | Number input type is always normalized to the string type, for example: 42 → "42" | The boolean values can be normalized to the string output type as: true → "true" false → "false" | Null input type coerces to an empty string as shown: null → "" |
Number | String input type can be normalized to a number if the string is a valid number, for example: "42" → 42 Normalization to an integer is possible if the string is a valid number without the fraction part.
|
-- | The boolean values can be normalized to a number type output types as follows: true → 1 false → 0 | Null input type normalizes to 0 as shown: null → 0 |
Boolean | Only the following strings can be normalized to the Boolean type: "true" → true "false" → false | Only the following numbers can be normalized to the boolean data type: 1 → true 0 → false
|
--
| Null value is normalized to a boolean false value as shown: null → false |
Null | Only empty strings can be normalized to null | Only empty strings can be normalized to null | Boolean value
|
-- |