json-schema-form / angular-schema-form

Generate forms from a JSON schema, with AngularJS!
https://json-schema-form.github.io/angular-schema-form
MIT License
2.47k stars 653 forks source link

Radio button validation is not working #786

Closed anushamca closed 8 years ago

anushamca commented 8 years ago

I have a simple form along with radio buttons.I made them as required. All are working properly except the radio buttons. Even if we select one of radio buttons still it is showing Required! error message.But I tested with my same schema and form on http://schemaform.io/examples/bootstrap-example.html#/07e5173aa0ecd930fd1814073eaf3f8e its working as we expected,but in browser not working I don't have any clue how to get fix it.Can any body help me please.

This is the schema what I used

Schema {"type": "object","title": "Employee Information","htmlClass": "row","properties": {"abc":{"title":"abc","type":"string"},"upstream":{"title":"Up Stream","type":"string","enum":["23","34","34"]},"downspeed":{"title":"Down Speed","type":"array","items":{"type":"string","enum":["1","2","3"]}},"email1":{"title":"Email1","type":"string"},"email":{"title":"Email","type":"string"},"dropdown":{"title":"Dropdown","type":"string","enum":["A","B","C"]}},"required":["upstream","downspeed","email","dropdown"]}

Form

[{"key":"abc","type":"number"},{"key":"upstream","validationMessage":"Upstream is required","type":"radios","titleMap":[{"value":"23","name":"23"},{"value":"34","name":"34"},{"value":"34","name":"34"}]},{"key":"downspeed","validationMessage":"Down Speed is required","type":"checkboxes","titleMap":[{"value":"1","name":"1"},{"value":"2","name":"2"},{"value":"3","name":"3"}]},{"key":"email1","validationMessage":"Email1 is required","type":"string"},{"key":"email","validationMessage":"email is required","type":"email"},{"key":"dropdown","validationMessage":"Select at least one value","type":"select","titleMap":[{"value":"A","name":"A"},{"value":"B","name":"B"},{"value":"C","name":"C"}]},{"type": "submit","title": "Save"}]

@json-schema-form/angular-schema-form-lead

Anthropic commented 8 years ago

Maybe if you build a plunker based on your own code someone can compare between the two and see what you did differently?

Also the demo link you added is not opening a saved Gist with your schema and form definition.

anushamca commented 8 years ago

Here is the gist link http://schemaform.io/examples/bootstrap-example.html#/2c3ba5414ce1e0a3cf020a7c4bc78ffd

but in gist its working properly in browser not working.

This is my form

anushamca commented 8 years ago

Also input type as number is also not working.

Anthropic commented 8 years ago

Can you make your page available or provide it as a plunker?

anushamca commented 8 years ago

I had fixed this issue long back.Sorry for not updated the status