Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pattern validation to slug fields in dimension editor #401

Open
japsu opened this issue Feb 1, 2024 · 0 comments
Open

Add pattern validation to slug fields in dimension editor #401

japsu opened this issue Feb 1, 2024 · 0 comments
Labels
good first issue typescript Pull requests that update TypeScript code

Comments

@japsu
Copy link
Contributor

japsu commented Feb 1, 2024

Currently this is the validator used in backend:

validate_slug = RegexValidator(
regex=r"[a-z0-9-]+",
message="Tekninen nimi saa sisältää vain pieniä kirjaimia, numeroita sekä väliviivoja.",
)

However, this is not validated on the forms, causing a GraphQL error and #399.

Add a similar pattern validator in the frontend to the inputs that convey slugs.

@japsu japsu added typescript Pull requests that update TypeScript code good first issue labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue typescript Pull requests that update TypeScript code
Projects
Status: No status
Development

No branches or pull requests

1 participant