{"id":18304250,"url":"https://github.com/ember-bootstrap/ember-bootstrap-cp-validations","last_synced_at":"2025-04-05T15:31:14.010Z","repository":{"id":40745902,"uuid":"54185578","full_name":"ember-bootstrap/ember-bootstrap-cp-validations","owner":"ember-bootstrap","description":"ember-cp-validations support for ember-bootstrap","archived":false,"fork":false,"pushed_at":"2023-12-15T17:56:28.000Z","size":6907,"stargazers_count":13,"open_issues_count":29,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T02:08:22.636Z","etag":null,"topics":["ember","ember-addon","ember-bootstrap","ember-cp-validations"],"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":"2016-03-18T08:23:15.000Z","updated_at":"2024-05-30T03:08:35.000Z","dependencies_parsed_at":"2024-06-18T21:25:01.960Z","dependency_job_id":"c65414d6-bb30-4233-b4bf-b9cb445abf55","html_url":"https://github.com/ember-bootstrap/ember-bootstrap-cp-validations","commit_stats":null,"previous_names":["kaliber5/ember-bootstrap-cp-validations"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-cp-validations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-cp-validations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-cp-validations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-bootstrap%2Fember-bootstrap-cp-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-cp-validations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247358576,"owners_count":20926251,"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","ember-cp-validations"],"created_at":"2024-11-05T15:28:14.249Z","updated_at":"2025-04-05T15:31:11.908Z","avatar_url":"https://github.com/ember-bootstrap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ember-bootstrap-cp-validations\n==============================================================================\n\n[![npm version](https://badge.fury.io/js/ember-bootstrap-cp-validations.svg)](http://badge.fury.io/js/ember-bootstrap-cp-validations)\n\nThis Ember addon adds support for validations based on [Ember CP Validations](https://github.com/offirgolan/ember-cp-validations) to [ember-bootstrap](https://www.ember-bootstrap.com) forms.\nThis way your forms are only submitted when the underlying data is valid, otherwise the appropriate bootstrap error\nmarkup will be applied. See the [FormElement documentation](https://www.ember-bootstrap.com/api/classes/Components.FormElement.html) for\nfurther details.\n\nCompatibility\n------------------------------------------------------------------------------\n\n* Ember Bootstrap v4\n* Ember CP Validations v4\n* Ember.js v3.16 or above\n* Ember CLI v3.15 or above\n* Node.js v10 or above\n\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install ember-bootstrap-cp-validations\n```\n\nYou should have installed the ember-bootstrap and ember-cp-validations addons already. If not install them:\n\n```\nember install ember-bootstrap\nember install ember-cp-validations\n```\n\nUsage\n------------------------------------------------------------------------------\n\nDefine your model and its validations as described in [Ember CP Validations](https://github.com/offirgolan/ember-cp-validations):\n\n```js\nimport Ember from 'ember';\nimport { validator, buildValidations } from 'ember-cp-validations';\n\nconst Validations = buildValidations({\n  username: validator('presence', true),\n  email: validator('format', { type: 'email' }),\n  password: validator('length', { min: 10 }),\n});\n\nexport default Ember.Component.extend(Validations, {\n  username: null,\n  email: null,\n  password: null,\n});\n```\n\nThen assign the model to your form:\n\n```hbs\n\u003cBsForm @model={{this}} as |form|\u003e\n  \u003cform.element @label=\"Username\" @controlType=\"text\" @property=\"username\" /\u003e\n  \u003cform.element @label=\"Email\" @controlType=\"email\" @property=\"email\" /\u003e\n  \u003cform.element @label=\"Password\" @controlType=\"password\" @property=\"password\" /\u003e\n  \u003cform.submitButton\u003eSubmit\u003c/form.submitButton\u003e\n\u003c/BsForm\u003e\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-cp-validations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-bootstrap%2Fember-bootstrap-cp-validations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-bootstrap%2Fember-bootstrap-cp-validations/lists"}