Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Improve validation messages #134

@stpoa

Description

@stpoa

Improve validation messages, example:

export const passwordValidator: Validator = value => {
  const passwordRegex = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s])/
  const trimmedValue = value.trim()

  return passwordLengthValidator(trimmedValue) ||
    !passwordRegex.test(trimmedValue)
    ? 'Nieprawidłowe hasło!'
    : ''
}

It should inform person about length, small big letters, special characters etc.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions