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
At the moment, formats only apply to strings, not to any other data type.
Coercion happens when the type is checked, before applying any other keywords, so the data becomes a number and format keyword is not applied.
There is a feature #291 to support format for all datatypes that I agreed to include - @nimerritt was going to create a PR - are you still?
@epoberezkin Yes, I mostly finished it last weekend but need to figure out how to support type detection in the format-rule, when there is no type declaration. I'll push what I have tomorrow and may need to tag you for a tip if I can't figure it out.
What version of Ajv are you using? Does the issue happen if you use the latest version?
Ajv options object (see https://github.com/epoberezkin/ajv#options):
JSON Schema (please make it as small as possible to reproduce the issue):
Data (please make it as small as posssible to reproduce the issue):
Your code (please use
options
,schema
anddata
as variables):Validation result, data AFTER validation, error messages:
What results did you expect?
valid and int32 format function was executed.
but int32 custom function was not executed.
Are you going to resolve the issue?
At this moment, I don't know how to resolve it.
The text was updated successfully, but these errors were encountered: