forked from MapComplete/MapComplete
Chore: sort code, improve error messages
This commit is contained in:
parent
cfeabe4d22
commit
6ed31b9f10
2 changed files with 29 additions and 30 deletions
|
|
@ -33,36 +33,35 @@ export type ValidatorType = (typeof Validators.availableTypes)[number]
|
|||
|
||||
export default class Validators {
|
||||
public static readonly availableTypes = [
|
||||
"string",
|
||||
"text",
|
||||
"date",
|
||||
"nat",
|
||||
"int",
|
||||
"distance",
|
||||
"direction",
|
||||
"wikidata",
|
||||
"pnat",
|
||||
"float",
|
||||
"pfloat",
|
||||
"email",
|
||||
"url",
|
||||
"phone",
|
||||
"opening_hours",
|
||||
"color",
|
||||
"image",
|
||||
"simple_tag",
|
||||
"key",
|
||||
"translation",
|
||||
"icon",
|
||||
"fediverse",
|
||||
"tag",
|
||||
"fediverse",
|
||||
"id",
|
||||
"slope",
|
||||
"velopark",
|
||||
"nsi",
|
||||
"currency",
|
||||
"date",
|
||||
"direction",
|
||||
"distance",
|
||||
"email",
|
||||
"fediverse",
|
||||
"float",
|
||||
"icon",
|
||||
"id",
|
||||
"image",
|
||||
"int",
|
||||
"key",
|
||||
"nat",
|
||||
"nsi",
|
||||
"opening_hours",
|
||||
"pfloat",
|
||||
"phone",
|
||||
"pnat",
|
||||
"regex",
|
||||
"simple_tag",
|
||||
"slope",
|
||||
"string",
|
||||
"tag",
|
||||
"text",
|
||||
"translation",
|
||||
"url",
|
||||
"velopark",
|
||||
"wikidata"
|
||||
] as const
|
||||
|
||||
public static readonly AllValidators: ReadonlyArray<Validator> = [
|
||||
|
|
@ -94,7 +93,7 @@ export default class Validators {
|
|||
new VeloparkValidator(),
|
||||
new NameSuggestionIndexValidator(),
|
||||
new CurrencyValidator(),
|
||||
new RegexValidator(),
|
||||
new RegexValidator()
|
||||
]
|
||||
|
||||
private static _byType = Validators._byTypeConstructor()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue