[V5] Inconsistencies between validator and properties declared in the model #1813
Unanswered
furatamasensei
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It going to be a bit longer to read since we're comparing 2 models here.
I'm working on request validator for my entire model & controllers and figured out an inconsistencies between of it. For example, in
Agenda
model, I have defined the columns like this:Agenda.ts
Inside the validator, I defined it like this:
AgendaValidator.ts
And then on my controller:
AgendaController.ts
It works and my IDE doesn't complain about how I define the properties inside the validator. However, when I try to do the same thing on my
PayrollInfo
model, my IDE starts complaining:Here is how I define the columns in the model:
PayrollInfo.ts
And the validator:
PayrollInfoValidator.ts
Then, the controller:
PayrollInfoController.ts
The migration:
xxxxxxxx_payroll_infos.ts
It stops complaining when I changed
public bankNumber
for example, topublic bank_number
but it leads me to an inconsistency when declaring a property which is some part written on camelCase, and some part written on snake_case.Am I missed something or I implemented it wrong? Please help and let me know..
Beta Was this translation helpful? Give feedback.
All reactions