Custom Fields
Re-Envisioned
Support General Validation does not work when field is clonable

  • Creator
    Topic
  • #6603
    ludovic.meyer
    Participant

    Hello,

    Validation works until the field is made clonable :

    Below example does not work (the field is not required)

    ...
    'rules'  => array(
      "test" => array(
        'required'  => true,
      ),
    ),
    
    'fields' => array(
      array(
        'name'    => 'Test',
        'id'      => 'vm_test',
        'type'    => 'text',
        'clone' => true,
      ),
    ),
    

    Can you fix this ?

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #6615
    vavakco
    Participant

    I have the same problem

    #6624
    Anh Tran
    Keymaster

    Hi,

    This problem is caused by the validation library. It checks by the ID attribute. When cloning, we change the ID (by appending _1, _2, etc.) and thus, break the validation. We’ll try to find a solution soon.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Validation does not work when field is clonable’ is closed to new replies.