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

Validate MinMax Nested Changeset #34

Merged
merged 3 commits into from Oct 8, 2018

Conversation

Projects
None yet
3 participants
@kinto-d
Copy link
Contributor

kinto-d commented Oct 5, 2018

insted of

chItems, _ := ch.Changes()["nested_field"].([]*changeset.Changeset)
if len(chItems) < 10 {
	changeset.AddError(ch, "nested_field", "minimum has 1 field")
}

now can be validated with

ValidateMin(ch, "nested_field", 10)
.gitignore Outdated
@@ -4,3 +4,4 @@ coverage.out
*.db
.vscode/
debug.test
.idea/

This comment has been minimized.

@kevinalfianto

kevinalfianto Oct 8, 2018

Contributor

dimarahin kurang enter kayaknya

kinto-d and others added some commits Oct 8, 2018

@Fs02 Fs02 merged commit 4b3f0f1 into Fs02:master Oct 8, 2018

4 checks passed

codeclimate Approved by Muhammad Surya Asriadie.
Details
codeclimate/diff-coverage 100% (0% threshold)
Details
codeclimate/total-coverage 100% (0.0% change)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment