Custom Fields
Re-Envisioned
Support MB Term Meta MB Term Required Validation Not Working

  • Creator
    Topic
  • #20876
    ossama saeed
    Participant

    Hi,

    The required validation for the fields in add new terms not working, it works only in the edit term page, but when trying to add term the validation not working.

    
     $meta_boxes[] = array(
            'title'      => 'Banner',
            'taxonomies' => 'news-categories',
            'fields' => array(
                array(
                    'name'  => 'Title',
                    'id'    => 'banner_title',
                    'type'  => 'text',
                    'required'  => 1,
                ),
                array(
        
                    'name'  => 'Description',
                    'id'    => 'banner_description',
                    'type'  => 'textarea',
                    'desc' => 'Maximum number of characters is 45',
                ),
                array(
                    'name'  => 'Body',
                    'id'    => 'banner_body',
                    'type'  => 'textarea',
                    'desc' => 'Maximum number of characters is 150',
                ),
                array(
                    'name'  => 'Image',
                    'id'    => 'banner_image',
                    'type' => 'image_advanced',
                    'max_file_uploads' => 1,
                    'required'  => 1,
                    'desc' => '(250 x 250)',
                ),
        
            ),
            'validation' => array(
                'rules'  => array(
                    'banner_image' => array(
                        'required'  => 1,
                    ),
                    // Rules for other fields
                ),
            )
        );
    
    

    Can you help me to fix this?
    Thank you,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #20885
    Long Nguyen
    Moderator

    Hi,

    Thank you for pointing this out, I’m going to check it and let you know later.

    #20971
    ossama saeed
    Participant

    Pls help. Need to fix this asap.

    Thank you

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