Open Kyokatarz opened 2 years ago
Hi,
How do I use the defined Custom Validator? For example if I define
class NameValidator < ApiPie::Validator::BaseValidator (...defined here) end
How do I use NameValidator then?
NameValidator
I tried calling in my route controller:
class Api::V2::NameController < Api::V2::ApplicationController api :PUT, '/v2/name', 'Get user name' param :name, NameValidator, desc: "Name", required: true param_group :defaults, Api::V2::ApplicationController (.......)
I get this error uninitialized constant Api::V2::NameController::NameValidator
uninitialized constant Api::V2::NameController::NameValidator
Is this written in the code somewhere? Or am I using it wrong?
I use param :useful_id, :number, 'ID/s of something useful' in the controller
param :useful_id, :number, 'ID/s of something useful'
and automatically, it loads up Apipie::Validator::NumberValidator
Apipie::Validator::NumberValidator
Hi,
How do I use the defined Custom Validator? For example if I define
How do I use
NameValidator
then?I tried calling in my route controller:
I get this error
uninitialized constant Api::V2::NameController::NameValidator
Is this written in the code somewhere? Or am I using it wrong?