Type validation on not required field

There is one way to do it i.e by JavaScript. You can create a custom JS for your input type number and override templates/admin/index.html and add the JavaScript in the block extrahead

{% extends "admin/index.html" %}

{% block extrahead %}
    {{ block.super }}
    # add a <script> tag here with your JavaScript
{% endblock %}

Here you will override the Django’s default admin panel templates.

1 Like

Alright, I will try this out, thank you