Added required fields check.