1👍
✅
Your approach is wrong, a maximum for a db value should be set with the proper attribute, namely max_value.
However this would require a schemamigration everytime you want to change it. So what you really should be doing is dynamic form validation where your form checks for a setting (which should probably be saved in your database and not be statically stored in a module like Settings, which would require server restarts).
There are plenty examples how to make a form validation more dynamically on stackoverflow
Source:stackexchange.com