Input with slash

Hi a clarification on the input of a field
I have a character field of length 4 in the models
the input should show the slash directly and allow the input of 2 numbers to the left of the slash and 2 numaries to the right of the slash e.g. 90/100
is it possible
Maybe the field should be taken to length 5 since there is also the slash ?

Please clarify what you’re looking for here.

Do you only want to store the 4 digits? (Note - your example shows 2 digits on the left and 3 on the right.)
Or do you want to store the data with the slash?

To be able to input like that, you have to implement it yourself using js or jquery.

Internally, form.is_vaild()=True can be created only when input is entered in a specific format through the validator or the clean_method of the form.

example

import re
from django.forms import forms
from django.core.exceptions import ValidationError

class A(forms.Form):
 def clean_a(slef):
  a = self.cleaned_data['a']
  try: re.findall('(\d{2})/(\d{2})', a)
  except: ValidationError('error message')
  # do something
  return data

Thank you for your reply, but this only inserts it at save time
I would like to have a date type field where dd/mm/yyyy is indicated.
and I only have to enter the data

… you want this??

just the one in the picture and it’s a character field
sla