+1 vote
37 views

I have a problem, it turns out that I want to verify the ID of my country that is "00000000-0" because it can have 7 or 8 numbers before the script and after the script it can end. So, I have not managed to find a method to only allow me and accept that format. Could you please help me?

Example of DNI of my country:

18654675-6
19657346-k
1543564-0

I have this code

def digit_verifier (dni): pat = re.compile ('^ \ d {7,8} - [0-9k]') if pat.search (str (dni)) is not None: return True return False

record model = "ir.ui.view" id = "gym.instructor_list">

      <field name = "name"> instructor list </ field>

      <field name = "model"> gym.instructor </ field>

      <field name = "arch" type = "xml">

        <tree>

          <field name = "id" />

          <field name = "name" />

          <field name="rut"/>

          <field name = "telefono" />

          <field name = "address" />

          <field name = "mail" />

          <field name = "class_id" />

        </ tree>

      </ field>

    </ record>
in Back-end by (10.5k points) | 37 views

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
205 questions
180 answers
37 comments
223,005 users