Thanks for catching that. The docs for the validation plugin are
currently being moved from the source code to the wiki and there has
also been some re-organization for the upcoming release of v1.2, so
the docs may be out of sync with the code for a few more days. We'll
make sure to get these li
Thanks for catching that problem. There was a problem when the
metadata plugin switched from $.meta to $.metadata (see
http://tinyurl.com/yv8mw5).
These demo files must've been missed for the release of v1.1.2, but
they are correct in current SVN. Jörn will probably update the demos
on his site
I don't think there are any lists of extra validation methods, other
than the additional-methods.js file that comes with the plugin. Most
of them are generic and useful as is, some of them are examples (like
ziprange) that would need to be modified for each user. Feel free to
contribute your val
You can use the validation plugin (http://jquery.com/plugins/project/
validate). There is a number validation already (actually, there's
number, digits only, and range), but I believe you'll need to create
your own validation for only alpha characters. You can easily add
your own validation rule
Just build it as a plugin:
(function($) {
$.fn.extend({
serializeHash: function() {
var hash = {};
$.each(this.serializeArray(), function() {
hash[this.name] = this.value;
});
return hash;
}
getScript doesn't wait for the script to finish loading before
continuing, so you are trying to call validator.setDefaults before the
validator exists.
This should work:
function setupValidator() {
$.validator.setDefaults({
submitHandler: function() { alert("submitted!");
You could store the type of validation error in a variable (either
global or in jQuery.data), then just apply a class of "fail" to the
invalid elements.
// check for validation errors
var errorType = '';
if (required && no val) {
errorType = 'required';
}
if (email && invalid email) {
err
Something like this should work:
function checkRadio() {
var checked = false;
$('input.amount').each(function() {
if ($(this).is(':checked')) {
checked = true;
return false;
}
});
retur
Don't use setInterval on methods that use ajax. Instead use
setTimeout as the last action in the callback for the ajax request.
The ajax request takes time, so making the request at a specific
interval may result in requests being processed much closer together
than expected. What you really wa
9 matches
Mail list logo