BUG FIXED: required rule didn't work properly with empty strings and NULL values