required fields validation fixed