Open peterdesmet opened 7 years ago
I see two elements: (1) is it currently implemented in the validator and (2) do we want it - in general - as a whip specification
# test for "a.ab"
. (1) no, the validator matches regex on numbers [0-9] only, (2) As the numberformat is called number
format, I would keep it as such and not extend the support towards non-numbers.
Does the format need to be expressed in quotes? (1) yes, otherwise the schema will not be valid (SchemaError: {'decimallatitude': [{'numberformat': ["must be of ['string'] type"]}]}
(2) I would keep it as such, simplifies the yaml intepretation.
Can the numberformat handle comma decimal points? (1) No, currently only dots support provided (2) if general good practice is to use dots for decimal number, I would stick to that and not extend support for bad practices.
Can the numberformat handle more formats? (1) No, (2) If really on the wish-list, it could become an implementation requirement.
Ok for all points, but would be more consistent if quotes are not required. See all rules above numberformat
: with or without quotes doesn't matter, except for regex, and the user is not aware that this is regex behind the scene.