Added custom validity and auto tab switch on errors, closes #263