Improve validation logic to also check the type of all properties
rdw-software opened this issue ยท 0 comments
There's a comment: -- TODO: Type checking, validation etc. here (if ever implemented)
(in the database schema)
Also, from Discord:
And if you wanted to validate the input fields themselves in the options, like check that only numbers and commas are inputted in NPC fields etc
This can (and indeed should) be used to validate user input for custom items, as well. Not sure if any is currently in place, but if not, it should be! And if it is, it should be streamlined to use the Validation
API to guarantee consistency.
It would be fairly easy to compile a list of expected types for each property. Some may have multiple types, like questId
(can be number
or table
, but that should be easily handled.
Needs to wait for #320 to be merged first.