ulion / jsonform

Build forms from JSON Schema. Easily template-able. Compatible with Twitter Bootstrap out of the box.
http://ulion.github.io/jsonform/playground/
MIT License
49 stars 27 forks source link

Color validation failing #14

Closed mushishi78 closed 9 years ago

mushishi78 commented 9 years ago

If you use a color picker, it fails validation with:

Validation errors Array[1]
  code: "UNKNOWN_FORMAT"
  message: "There is no validation function for format 'color'"
  path: "#/properties/maincolor"

You can see it in the console when you click the update button in the playground example

ulion commented 9 years ago

json schema does not support "color" format, so the example is using it in improper way.

but you can always setup "type" to "color" in the form definition rather in the schema for that field.

2015-06-29 17:16 GMT+08:00 Max White notifications@github.com:

If you use a color picker, it fails validation with:

Validation errors Array[1] code: "UNKNOWN_FORMAT" message: "There is no validation function for format 'color'" path: "#/properties/maincolor"

You can see it in the console when you click the update button in the playground example http://ulion.github.io/jsonform/playground/?example=fields-color

— Reply to this email directly or view it on GitHub https://github.com/ulion/jsonform/issues/14.

Ulion

mushishi78 commented 9 years ago

Thanks! It'd be cool if you could update the example then.

ulion commented 9 years ago

Updated. thx.

2015-06-29 22:00 GMT+08:00 Max White notifications@github.com:

Thanks! It'd be cool if you could update the example then.

— Reply to this email directly or view it on GitHub https://github.com/ulion/jsonform/issues/14#issuecomment-116674010.

Ulion