Skip to content

Commit

Permalink
1.0.1 updated documentation and release
Browse files Browse the repository at this point in the history
  • Loading branch information
magestican committed Aug 26, 2017
1 parent 8a0553e commit aea69da
Show file tree
Hide file tree
Showing 11 changed files with 6,622 additions and 140 deletions.
11 changes: 9 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"plugins": [
"transform-object-rest-spread",
"transform-class-properties"
],
"presets": [
"es2015",
"node6", ["es2015", {
"modules": false
}],
"react"
],
"env": {
"development": {
"presets": [
"react-hmre"
]
],
"plugins": ["istanbul"]
}
}
}
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ No more form validations, with valid-me-react you can validate groups of items,
# React sample using JSX :

```jsx

import ReactDOM from 'react-dom';
import {ValidMe,forceValidation} from 'valid-me-react/src/validMeReact';
import {ValidMe,forceValidation,clearAllValidationErrors,phoneTypesEnum} from 'valid-me-react';

let doHi = () => {
let areThereErrors = forceValidation(undefined, undefined, 'hi'); //validate elements belonging to group hi
console.log(areThereErrors);
if (!areThereErrors){
clearAllValidationErrors();
}
}
let handleChange = (event) => {
console.log(event.target.value);
Expand All @@ -34,3 +36,12 @@ ReactDOM.render((
```

*The styles available in the live-sample are on the sample-styles.css file*

Extra attributes you can pass to the ValidMe element :

**validmemessage**
**validmefor**
**validmecondition**
**validmenocolor**
**validmeerror**
**validmesuccess**
94 changes: 38 additions & 56 deletions dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bundle.js.map

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
require('./dist/bundle.js');
var results = require('./dist/bundle.js');

var validMe = global.ValidMe;
var clearAllValidationErrors = global.clearAllValidationErrors
var forceValidation = global.forceValidation

module.exports = {validMe,clearAllValidationErrors,forceValidation};
module.exports = results;
Loading

0 comments on commit aea69da

Please sign in to comment.