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

Make keys the second argument to validations #2

Closed
wants to merge 2 commits into from
Closed

Make keys the second argument to validations #2

wants to merge 2 commits into from

Conversation

abp
Copy link

@abp abp commented Feb 15, 2013

I've revamped verily to use the notation

:validation <keys> [args] [msg]

instead of

:validation [args] <keys> [msg]

That's for three reasons:
Ensure key-keyword is distinct from msg-keyword when i18n-support is
implemented:

[:validation :key <args> :my.custom.msg]

The other reason is that it makes the implementation of the
type-validation/custom-validation merge in formative slightly simpler.

Also, this way it's more consistent, I think. What do you think?

Adrian Bendel added 2 commits February 15, 2013 19:44
Added :int and :ints for consistency, :dates was missing.
I've revamped verily to use the notation
:validation <keys> [args] [msg]
instead of
:validation [args] <keys> [msg]

That's for three reasons:
Ensure key-keyword is distinct from msg-keyword when i18n-support is
implemented:
[:validation :key <args> :my.custom.msg]

The other reason is that it makes the implementation of the
type-validation/custom-validation merge in formative slightly simpler.

Also, this way it's more consistent, I think. What do you think?
@abp
Copy link
Author

abp commented Feb 15, 2013

That actually breaks the semantic of some validators. Not a good solution, too.

@jkk
Copy link
Owner

jkk commented Jul 29, 2013

I've added issue #4 to address the underlying requirement here. Closing this issue.

@jkk jkk closed this Jul 29, 2013
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