replace validate functions with widget methods and improve documentation