Added validation options and fixed form reset.