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

More form constraints #28

Open
samuelcolvin opened this issue Dec 1, 2023 · 2 comments · May be fixed by #81
Open

More form constraints #28

samuelcolvin opened this issue Dec 1, 2023 · 2 comments · May be fixed by #81
Labels
enhancement New feature or request
Milestone

Comments

@samuelcolvin
Copy link
Member

Currently we don't apply many common constraints from pydantic/json schema to forms:

  • max length / min length
  • gt, lt, ge, le
  • multiple of

Shouldn't be too hard to add these to the form field pydantic models, populate them in json_schema.py and add them to the input in the frontend.

@samuelcolvin samuelcolvin added the enhancement New feature or request label Dec 1, 2023
@WolfDWyc
Copy link
Contributor

WolfDWyc commented Dec 2, 2023

As far as I understand, these can all be validated - but currently only on the server side? I assume the benefit of also validating this client side is speed but I'm not sure if I'm missing any others.

@samuelcolvin
Copy link
Member Author

Yes

@ischaojie ischaojie linked a pull request Dec 8, 2023 that will close this issue
@sydney-runkle sydney-runkle added this to the v2.6.0 milestone Apr 19, 2024
@sydney-runkle sydney-runkle modified the milestones: v0.6.0, v0.7.0 May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants