fixes #5820 Error in console when enable the mandatory field
Merge pull request #5884 from dotCMS/issue-5820-Error-in-console-when-enable-the-mandatory-field

fixes #5820 Error in console when enable the mandatory field