You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this is the intended behavior, but while updating this package from an old version (1.14 to 1.20) we came across this issue, so I wanted to create a note of it. Maybe it should be more of a feature request, but it is inconsistent given how the default "image/*" is handled.
Current behavior
Providing the accept as "*" resolves it as a faulty regex (since it is)
Expected behavior
Handle "*" as ".*", similar to how "/*" is handled as "/.*", or more realistically do this only when a single "*" is provided.
Live demo
....validate({
rules: {
file_input: {
required: true,
extension: "gif|json",
accept: "*" // currently using ".*" for the code to run as expected
}
},
Sorry if this is the intended behavior, but while updating this package from an old version (1.14 to 1.20) we came across this issue, so I wanted to create a note of it. Maybe it should be more of a feature request, but it is inconsistent given how the default "image/*" is handled.
Current behavior
Providing the accept as "*" resolves it as a faulty regex (since it is)
Expected behavior
Handle "*" as ".*", similar to how "/*" is handled as "/.*", or more realistically do this only when a single "*" is provided.
Live demo
Relevant code line
https://github.com/jquery-validation/jquery-validation/blob/master/src/additional/accept.js#L22
The text was updated successfully, but these errors were encountered: