Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-simple-validation

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-simple-validation - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

2

package.json
{
"name": "ember-cli-simple-validation",
"version": "0.3.2",
"version": "0.4.0",
"description": "ember-cli addon that provides simple form validation",

@@ -5,0 +5,0 @@ "directories": {

@@ -25,5 +25,22 @@ # ember-cli-simple-validation

## Installation
## Installation with ember-data (or vanilla ember object)
```
1) npm install ember-cli-simple-validation --save-dev
2) add isDirty computed for the field you validate (username example below)
```
```js
Ember.Object.extend({
username: null,
usernameIsDirty: false,
usernameChanged: function () {
this.set("usernameIsDirty", true);
}.observes("username")
});
```
## Installation with ember-cli-simple-store
```
1) remove ember-data from your package.json file

@@ -76,3 +93,3 @@ 2) remove ember-data from your bower.json file

The last step is to add a true model object and declare each field.
The last step is to add a true model object and declare each field

@@ -102,3 +119,3 @@ ```js

3) The mixin will add a computed property called "valid" that you can use to confirm each field is valid
4) The model needs to support dirty tracking at the field level (ember-cli-simple-store provides the model and dirty tracked attribute)
4) The model needs to support dirty tracking at the field level (ember-cli-simple-store provides the model and dirty tracked attribute but ember-data and ember object will work if you add the isDirty computed)
5) The css class that is added to the span is "hidden"

@@ -105,0 +122,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc