Image/file field does not take validation

Support MB Frontend Submission Image/file field does not take validation

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12395
    calpaqcalpaq
    Participant

    Hi Anh,
    How do I make a file upload field a required field. I tried using required attribute but it doesn't work.
    Thanks & Regards,
    Calpaq

    #12397
    FarheenFarheen
    Participant

    Hello Calpaq

    Can you specify what steps are you following.

    #12398
    calpaqcalpaq
    Participant

    Please have a look to upload field I have defined

    'fields' => array( 
        array( 
            'id' => 'eto_personal_photograph', 
            'type' => 'image', 
            'name' => esc_html__( 'Upload your photograph: ', 'tmi' ), 
            'desc' => esc_html__( 'Your photograph can only be in .gif, .jpg or .png format.', 'tmi' ), 
            'max_file_uploads' => '1', 
            'attributes' => array( 
                'required' => array( 'required' => "true" ), 
            ), 
            'columns' => 12, 
        ),
    )

    will this help?
    Regards

    #13237
    handyhandy
    Participant

    Any update for this?

    #13239
    calpaqcalpaq
    Participant

    Hi handy,
    The only way I find out is, take the file field out of the group and take it as individual field.
    Regards

    #13299
    Anh TranAnh Tran
    Keymaster

    Hey guys,

    This is a bug and I've just fixed it on Github. It's available in the new version soon.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.