{"id":15015790,"url":"https://github.com/ember-bootstrap/ember-bootstrap-constraint-validations","last_synced_at":"2025-04-12T10:07:45.581Z","repository":{"id":39620755,"uuid":"495922118","full_name":"ember-bootstrap/ember-bootstrap-constraint-validations","owner":"ember-bootstrap","description":"Integrate native HTML5 validation into custom styled ember-bootstrap forms.","archived":false,"fork":false,"pushed_at":"2025-01-25T11:29:24.000Z","size":663,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T10:07:36.444Z","etag":null,"topics":["ember","ember-addon","ember-bootstrap"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ember-bootstrap.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-24T17:23:07.000Z","updated_at":"2022-07-19T13:31:32.000Z","dependencies_parsed_at":"2023-02-15T18:16:09.294Z","dependency_job_id":"43a652d9-44b4-4217-bd94-7c321dd58794","html_url":"https://github.com/ember-bootstrap/ember-bootstrap-constraint-validations","commit_stats":{"total_commits":74,"total_committers":3,"mean_commits":"24.666666666666668","dds":0.3648648648648649,"last_synced_commit":"87068d21a254ab47bee144a11e312b40802cf2c1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-constraint-validations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-constraint-validations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-constraint-validations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-constraint-validations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ember-bootstrap","download_url":"https://codeload.github.com/ember-bootstrap/ember-bootstrap-constraint-validations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248550635,"owners_count":21122933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ember","ember-addon","ember-bootstrap"],"created_at":"2024-09-24T19:47:56.142Z","updated_at":"2025-04-12T10:07:45.549Z","avatar_url":"https://github.com/ember-bootstrap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ember-bootstrap-constraint-validations\n==============================================================================\n[![CI](https://github.com/kaliber5/ember-bootstrap-constraint-validations/actions/workflows/ci.yml/badge.svg)](https://github.com/kaliber5/ember-bootstrap-constraint-validations/actions/workflows/ci.yml)\n\nThis addon integration with [ember-bootstrap](https://www.ember-bootstrap.com/) to support form validations based on the\nbrowser's native HTML5 [constraint validation API](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Constraint_validation).\nBut instead of the browser's built-in validation UI, validation errors will be rendered using Bootstrap's [Custom Styles](https://getbootstrap.com/docs/5.2/forms/validation/#custom-styles).\nSee the [FormElement documentation](https://www.ember-bootstrap.com/api/classes/Components.FormElement.html) for\nfurther details.\n\n\nCompatibility\n------------------------------------------------------------------------------\n\n* Ember Bootstrap v5 or above\n* Ember.js v3.24 or above\n* Ember CLI v3.24 or above\n* Node.js v12 or above\n\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install ember-bootstrap-constraint-validations\n```\n\n\nUsage\n------------------------------------------------------------------------------\n\nApply the HTML5 validation attributes as needed to your form controls. The form elements [`@controlType`](https://www.ember-bootstrap.com/api/classes/Components.FormElement.html#property_controlType)\nargument will already apply the correct `type` attribute for the rendered `\u003cinput\u003e` element. But you can also add \nadditional HTML5 attributes like `required`, by applying them as attributes to the form control. \nFor this you must use the block form syntax of form elements, so you can apply them to the yielded form `control` (which basically represents the `\u003cinput\u003e`), \nand not the parent *element* (a wrapper `\u003cdiv\u003e`):\n\n```hbs\n\u003cBsForm @model={{this.model}} as |form|\u003e\n  \u003cform.element @label=\"Name\" @property=\"name\" as |el|\u003e\n    \u003cel.control required minlength=\"3\"/\u003e\n  \u003c/form.element\u003e\n  \u003cform.element @controlType=\"email\" @label=\"Email\" @property=\"email\" /\u003e\n  \u003cform.submitButton\u003eSubmit\u003c/form.submitButton\u003e\n\u003c/BsForm\u003e\n```\n\nIn this example we have defined a \"Name\" text field, which is `required` and has a `minlength` of 3, as well as an optional field of type\n`email`. When submitting this form, or when focussing out of a field, the appropriate Bootstrap validation markup will be rendered:\n\n\u003cimg src=\"./docs/validated-form.png\" alt=\"validated form\" width=\"446\" height=\"316\"/\u003e\n\nNote that the error messages are natively provided by the browser itself, given by the form element's [`validationMessage`](https://developer.mozilla.org/en-US/docs/Web/API/Constraint_validation#validationmessage).\n\n\nContributing\n------------------------------------------------------------------------------\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n\nLicense\n------------------------------------------------------------------------------\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-bootstrap%2Fember-bootstrap-constraint-validations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-bootstrap%2Fember-bootstrap-constraint-validations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-bootstrap%2Fember-bootstrap-constraint-validations/lists"}