Validation does not work when field is clonable

Support General Validation does not work when field is clonable

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6603
    ludovic.meyerludovic.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,

    #6615
    vavakcovavakco
    Participant

    I have the same problem

    #6624
    Anh TranAnh 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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Validation does not work when field is clonable’ is closed to new replies.