jquery validator message I want to over ride

31 views
Skip to first unread message

Andy Jarrett

unread,
Jul 30, 2012, 10:13:28 AM7/30/12
to validate...@googlegroups.com
Hi,

I've got a form which allows file uploads but when I used the attribute accept="image/*" a jQuery/JS validator kicks in which uses the "Accept" method: http://docs.jquery.com/Plugins/Validation/Methods/accept#extension

Is there a way to override this with ValidateThis?

Andy J

John Whish

unread,
Jul 30, 2012, 5:28:45 PM7/30/12
to validate...@googlegroups.com
Hi Andy - Sorry haven't tested this, but is it the jQuery plugin that
is validating it or just the browser? If it's the browser's inbuilt
HTML5 form validation that's kicking in then just add a novalidate
attribute to the file upload field. Something like:

$('input[file=file]').attr('novalidate', 'novalidate');

Worth a try :)
> --
> You received this message because you are subscribed to the Google Groups
> "ValidateThis-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/validatethis-dev/-/P8-ypKN6MEgJ.
> To post to this group, send email to validate...@googlegroups.com.
> To unsubscribe from this group, send email to
> validatethis-d...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/validatethis-dev?hl=en.
Reply all
Reply to author
Forward
0 new messages