Skip to content

Control error message #113

Closed
Closed
@thovo

Description

@thovo

Hi,

Could I catch the error type and give a specific message for each error?
Example:

<input class="nt-cover-file" type="file" id="nt-cv" value="2097152" name="fileCoverLetter" data-validation="file mime size" data-validation-allowing="rtf,msword,pdf,x-mswrite,docx,doc" data-validation-max-size="2M" data-validation-error-msg=" "/>

I am checking for mime type of the file and size of the file. I write a callback when this input has been validated but I don't know what type of error, I just can check it is valid or not and give only one message like that:

if(!isValid){
        $(this).attr('data-validation-error-msg', 'You have not chosen a file, or file is not supported or too large');
      }

Does plugin have any way to check it?

Thanks,
Tho Vo

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions