What is the best way to validate a json object? (POST request)

I must create a class (JobClass) and include ActiveModel::Validations?
and then
valided = JobClass.new(params).valid?

The JSON body :

I can not create rules corresponding to the validation of the field
“method” … It can be “concat” or “split” but it is not the first

How can I do?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs