Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended support for arrays & date-time fields #1

Merged
merged 4 commits into from
Sep 28, 2015

Conversation

mikkoronkkomaki
Copy link

Added support for:

  1. Arrays: minimum & maximum number of elements and item uniqueness can now be validated
  2. Date-time elements: Strings with date-time format can now be validated

Also included tests for each new feature.

@mikkoronkkomaki mikkoronkkomaki changed the title Expanded support for arrays & date-time fields Extended support for arrays & date-time fields Sep 28, 2015
max-items (get schema "maxItems")
item-schema (get schema "items")
uniqueItems (get schema "uniqueItems")]
(if (and min-items (> min-items (count data)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use cond instead of multiple nested ifs?

the do that wraps the let is unnecessary

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the nested ifs into a single cond. Removed the unneeded do block.

1. Change date-time format error to use correct error type
2. Change nested ifs to use a cond
3. Remove un needed do function call
@mikkoronkkomaki
Copy link
Author

Requested changes done.

tatut added a commit that referenced this pull request Sep 28, 2015
Extended support for arrays & date-time fields
@tatut tatut merged commit 7ae1ab3 into tatut:master Sep 28, 2015
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.

2 participants