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

Improve the integer validator #362

Closed
YagamiNewLight opened this issue Dec 13, 2017 · 3 comments · Fixed by #364
Closed

Improve the integer validator #362

YagamiNewLight opened this issue Dec 13, 2017 · 3 comments · Fixed by #364

Comments

@YagamiNewLight
Copy link

When I want to use integer validator and min/max attribute together,the min/max will not work.And I checked the integer validator,found there is no relevant field.min and field.max code,Could you please add it in integer validator?

zoul0813 added a commit to zoul0813/vue-form-generator that referenced this issue Dec 13, 2017
…idator, and returns `invalidIntegerl: "The value is not an integer"` as well as any errors generated by `number`

* wrapped one-liner conditionals/loops with `{}` (looks cleaner)
* simplified some conditionals by merging `if(cond1) { if(cond2) { } }` into `if(cond1 && cond2) { }`
@zoul0813
Copy link
Member

@YgamiLight can you review PR #364 and let me know if that closes this issue?

zoul0813 added a commit to zoul0813/vue-form-generator that referenced this issue Dec 13, 2017
…into feature/340-select-none

* 'master' of https://github.com/icebob/vue-form-generator:
  fixes vue-generators#362 - `integer` validator now calls `number` validator, and returns `invalidIntegerl: "The value is not an integer"` as well as any errors generated by `number`
  fixes vue-generators#361 - use $event.target.valueAsNumber for number/range inputs, debounce `formatValueToModel` for number/range, removed `formatValueToField`

# Conflicts:
#	dist/vfg-core.js
#	dist/vfg.js
zoul0813 added a commit to zoul0813/vue-form-generator that referenced this issue Dec 13, 2017
* master:
  reverting back to original test
  reverted back to `schema.required` for "none selected" disabled state, per @icebob
  fixes vue-generators#340 - "none" value set to `null`, formatValueToField checks for `isNil(value)` and returns `null`, none options are always disabled
  fixes vue-generators#362 - `integer` validator now calls `number` validator, and returns `invalidIntegerl: "The value is not an integer"` as well as any errors generated by `number`
  fixes vue-generators#361 - use $event.target.valueAsNumber for number/range inputs, debounce `formatValueToModel` for number/range, removed `formatValueToField`
  added missing comma that failed in Travis
  requested by @icebob
  fixes vue-generators#341 - introduced debounce functionality into `formatValueToModel`

# Conflicts:
#	dist/vfg-core.js
#	dist/vfg.js
#	package-lock.json
@YagamiNewLight
Copy link
Author

Fixed,I think.Thank you!

@zoul0813
Copy link
Member

You think?

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 a pull request may close this issue.

2 participants