Fix required field functionality