Custom Fields
Support General File Upload Validation

  • Creator
  • #16096
    Ranadeep Ghose


    I'm require my file upload to only allow PDFs. I have used the following code but it does not work. Please help me point out how to do it.

Viewing 1 replies (of 1 total)
  • Author
  • #16110
    Anh Tran

    Hi Ranadeep,

    The extension validation is an add-on for the jQuery validation library and it's not included in Meta Box.

    In order to use it, please download the extension.js file from Github:

    And enqueue it like this:

    add_action( 'rwmb_enqueue_scripts', function() {
        wp_enqueue_script( 'jquery-validation-extension', 'url to the js file', '', '', true );

    Then you can use the extension rule.

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