Update frontend/src/validation-rules.js

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
This commit is contained in:
Moriz Wahl 2023-05-19 09:01:15 +02:00 committed by GitHub
parent 36b1a3fb72
commit e446ad7e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,7 @@ export const loadAllRules = (i18nCallback, apollo) => {
extend('validIdentifier', { extend('validIdentifier', {
validate(value) { validate(value) {
const isEmail = !!EMAIL_REGEX.test(value) const isEmail = !!EMAIL_REGEX.test(value)
const isUsername = !!value.match(usernameRegex) const isUsername = !!value.match(USERNAME_REGEX)
const isGradidoId = validateUuid(value) && versionUuid(value) === 4 const isGradidoId = validateUuid(value) && versionUuid(value) === 4
return isEmail || isUsername || isGradidoId return isEmail || isUsername || isGradidoId
}, },