Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/shrihari-prakash/liquid int…
Browse files Browse the repository at this point in the history
…o release
  • Loading branch information
shrihari-prakash committed Oct 29, 2023
2 parents 155548e + ad74393 commit 335f37e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validator/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Language } from "../enum/language";
class UserValidator {
nameValidationRegex = new RegExp(Configuration.get("user.profile.name-validation-regex"), "u");
passwordRegex = Configuration.get("user.profile.password-validation-regex");
alphaRegex = /^(__unset__|[A-Za-z]+)$/;
alphaRegex = /^(__unset__|[A-Za-z ]+)$/;
fn: typeof query | typeof body;

urlValidator = (value: string) => {
Expand Down Expand Up @@ -158,7 +158,7 @@ class UserValidator {
pronouns(required = false, nested = false) {
const field = this.makeFieldName("pronouns", nested);
const requiredFn = required ? "exists" : "optional";
return this.fn(field)[requiredFn]().isString().matches(this.alphaRegex).isLength({ min: 3, max: 24 });
return this.fn(field)[requiredFn]().isString().isLength({ min: 3, max: 24 });
}

organization(required = false, nested = false) {
Expand Down

0 comments on commit 335f37e

Please sign in to comment.