forked from MapComplete/MapComplete
Merge develop
This commit is contained in:
commit
94f39e89fe
174 changed files with 3695 additions and 3420 deletions
|
|
@ -3,7 +3,7 @@ import { Translation } from "../../i18n/Translation"
|
|||
import Translations from "../../i18n/Translations"
|
||||
|
||||
export default class FediverseValidator extends Validator {
|
||||
public static readonly usernameAtServer: RegExp = /^@?(\w+)@((\w|\.)+)$/
|
||||
public static readonly usernameAtServer: RegExp = /^@?(\w+)@((\w|-|\.)+)$/
|
||||
|
||||
constructor() {
|
||||
super(
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
import { Validator } from "../Validator"
|
||||
import { Translation } from "../../i18n/Translation"
|
||||
import Translations from "../../i18n/Translations"
|
||||
import TagKeyValidator from "./TagKeyValidator"
|
||||
import SimpleTagValidator from "./SimpleTagValidator"
|
||||
|
||||
/**
|
||||
* Checks that the input conforms a JSON-encoded tag expression or a simpleTag`key=value`,
|
||||
*/
|
||||
export default class TagValidator extends Validator {
|
||||
public readonly isMeta = true
|
||||
|
||||
constructor() {
|
||||
super("tag", "A simple tag of the format `key=value` OR a tagExpression")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export default class TranslationValidator extends Validator {
|
|||
super("translation", "Makes sure the the string is of format `Record<string, string>` ")
|
||||
}
|
||||
|
||||
isValid(value: string, getCountry?: () => string): boolean {
|
||||
isValid(value: string): boolean {
|
||||
try {
|
||||
JSON.parse(value)
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue