If a Django model field is defined with validators, they should be propagated down through the configuration and used for new/edit screens on the client.
In general it is impossible to use the same validation code on the client (Python code run on the server vs JavaScript in the browser). However:
-
basic validators could be translated (MaxValueValidator, MinValueValidator, MaxLengthValidator, MinLengthValidator, DecimalValidator);
-
stubs for the rest could be generated and a warning issued; if a validator is used by different models, it should also be reused on the client side.
If a Django model field is defined with validators, they should be propagated down through the configuration and used for new/edit screens on the client.
In general it is impossible to use the same validation code on the client (Python code run on the server vs JavaScript in the browser). However:
basic validators could be translated (MaxValueValidator, MinValueValidator, MaxLengthValidator, MinLengthValidator, DecimalValidator);
stubs for the rest could be generated and a warning issued; if a validator is used by different models, it should also be reused on the client side.