You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm following the rest code example, and I'm having this error in the guards:
I already implemented check(), but the error continues
moduleRestmoduleGuardclassUserValidator < Shivneri::Guard
@[Inject("as_body")]
@[BodySameAs("UserController", "add_user")]
defcheck(user)
err_message = validate user
if (err_message.size >0)
return text_result(err_message, 400)
endenddefvalidate(user)
if (user.name.size <5)
return"name should be minimum 5 characters"elsif (!["male", "female"].include? user.gender)
return"gender should be either male of female"endreturn""endendendend
The text was updated successfully, but these errors were encountered:
I'm following the rest code example, and I'm having this error in the guards:
I already implemented
check()
, but the error continuesThe text was updated successfully, but these errors were encountered: