Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When using the FileExtensionAttribute
on an IFormFile
, the data-val-fileextensions-extensions
attribute is not constructed per jQuery documentation https://jqueryvalidation.org/extension-method/. The client-side validation always fails because each file extension is prefixed with a period.
jQuery validation expects the file extensions to be given as comma or pipe-delimited without periods or spaces so they can be matched using RegEx.
https://github.com/jquery-validation/jquery-validation/blob/6cd68f68e395b1c3a2588e6e7d64f561410c2dc0/src/additional/extension.js#L2-L4
The normalized list of comma-delimited extensions should be used for the attribute instead of _extensions
.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
In jquery-validation 1.13.1 and older, this issue likely went mostly unnoticed due to a bug (This was fixed in jquery-validation 1.14.0)
.NET Version
No response
Anything else?
No response