Package Exports
- valik
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (valik) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Valik
The ultimate solution to your error handling. With everything in your control, it is the easiest module to implement.
Installation :
npm i --save valik
Usage :
import React, { Component } from 'react';
import { valikName } from 'valik';
class App extends Component{
state = {
name: ''
}
render(){
return(
<div>
<input placeholder="enter your name" value={this.state.name}
onChange={( event ) => this.setState({name: event.target.value})}
/>
<button
onClick={()=>console.log(valikName({name: this.state.name, errorEmpty: "Please enter your name"}))}>
submit</button>
</div>
)
}
}