fix required fields javascript and messages