Skip to content

Ensure value is string before validating format#117

Open
melvey wants to merge 1 commit intoflatiron:masterfrom
melvey:master
Open

Ensure value is string before validating format#117
melvey wants to merge 1 commit intoflatiron:masterfrom
melvey:master

Conversation

@melvey
Copy link

@melvey melvey commented Jun 27, 2017

Format validation can only be applied to string objects. Checking the value is a string before validating the format means that format validation can be used when multiple types are accepted
e.g.

{
  type: ['string', 'null'],
  format: 'date-time'
}

@melvey
Copy link
Author

melvey commented Jun 27, 2017

Looks like the travis build fails to install dependencies as npm uses arrow functions which are not supported in the target node versions.
It might be worth updating the target build versions as a significant number of updates have been released since

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant