score:1

Accepted answer
interface RegexSignup {
  [key: string]: { inputWarning: string, inputRegex: RegExp }
}

const checkRegexSignUp: RegexSignup = {
  firstName: { inputWarning: "only letters", inputRegex: /^[a-z ,.'-]+$/i },
  lastName: { inputWarning: "only letters", inputRegex: /^[a-z ,.'-]+$/i },
}

Related Query

More Query from same tag