Simple validation plugin with vanilla Javascript