I want to set the maximum number of characters per line in Django's TextField.

Asked 2 years ago, Updated 2 years ago, 82 views

Thank you for your help
Django, Python novice

TextField is defined in the model to store the data in the text.
In order to save data to the server for HTML-side text display,

Up to 20 characters per line, and if the maximum number of characters is exceeded, a new line should be entered on the next line. I'm wondering if I can set up validation in the field

If there is a way to meet these requirements, please let me know.
Also, if you can save the text, it can be a different field type.
Thank you for your cooperation

python python3 django

2022-09-29 20:28

1 Answers

Why don't you make validators?

Django Documentation - Write validators


2022-09-29 20:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.