Revert "Fix and refactoring mask_validator"

This reverts commit e3bf3e5a0d313f75d2028b7f78dd7417858dbf67.
Refactoring to work with no ActiveRecord models