I am working on this plugin and I have an error message that talks about some issues with Android 2.3.
I downloaded the Android SDK and tried the plugin in version 2.3, and it looks like the text inputs are not checked, and the error does not appear or does not work. Other entrances confirm the penalty. I tried in Android 4.0+ and it seems to work fine. I don’t know where to start, because I don’t know where this problem is from, and I don’t have a real Android phone to debug these things, and the emulator lacks development tools, etc.
I doubt that dumping the code here will help, but this is the method validate()that can be found in js/idealforms.js. An “error” should appear either here or somewhere else in this file, unless it is CSS related, which I don’t think so.
validate: function (input, value) {
var isValid = true,
error = '',
$input = input.input,
userOptions = input.userOptions,
userFilters = userOptions.filters
if (userFilters) {
if (!value && /required/.test(userFilters)) {
error = (
userOptions.errors && userOptions.errors.required
? userOptions.errors.required
: 'This field is required.'
)
isValid = false
}
if (value) {
userFilters = userFilters.split(/\s/)
for (var i = 0, len = userFilters.length; i < len; i++) {
var uf = userFilters[i],
theFilter = typeof Filters[uf] === 'undefined' ? '' : Filters[uf],
isFunction = typeof theFilter.regex === 'function',
isRegex = theFilter.regex instanceof RegExp
if (
theFilter && (
isFunction && !theFilter.regex(input, value) ||
isRegex && !theFilter.regex.test(value)
)
) {
isValid = false
error = (
userOptions.errors && userOptions.errors[uf] ||
theFilter.error
)
break
}
}
}
}
return {
isValid: isValid,
error: error
}
}
Can anyone help me out? I want this plugin to work as many platforms as possible, but it is difficult to do without an actual Android phone.
source
share