updated requiredField method