refactor validators similar ActiveModel::Validations format