def create
      validated = Validator.new(validator_params).validate
      response = { 'errors' => validated.errors.messages.stringify_keys.map{|i| {i[0] => i[1]}} }
      render json: response.to_json
    end
def create
      validated = Validator.new(validator_params).validate
      response = { 'errors' => validated.errors.messages.stringify_keys.map{|i| {i[0] => i[1]}} }
      render json: response.to_json
    end
POST /validators

 {
     'validator': {
         'form_object': 'validations/signup_form_company_name',
         'resource_model': 'company'
         'resource_attr_name': 'name',
         'resource_attr_value': 'Efigence'
     }
 }

 or:

 {
     'validator': {
         'form_object': '',
         'resource_model': 'company'
         'resource_attr_name': 'name',
         'resource_attr_value': 'Efigence'
     }
 }

 Response (jsonapi.org format)

 on success:

 {
   'errors': []
 }

 on failure:

 {
   'errors': [
     {
       'name': [
         'has already been taken'
       ]
     }
   ]
 }