def check_validation(valid, value)
      return unless valid && value

      passes_validation = begin
                            valid.call(value)
                          rescue StandardError
                            false
                          end
      passes_validation ? nil : 'is invalid'
    end
def check_validation(valid, value)
      return unless valid && value

      passes_validation = begin
                            valid.call(value)
                          rescue StandardError
                            false
                          end
      passes_validation ? nil : 'is invalid'
    end
Checks that required field meets validation
 @param [Boolean or Callable] valid - callable validation fn or boolean
                               function will be called with value
 @param [Object] value - value to check
 @return [Maybe String] error message