added validate widget, which acts like jQuery.validation plugin