Added validation to prevent saving of masked fields.