JSPM

valik

1.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 4
    • Score
      100M100P100Q5502F
    • License ISC

    The ultimate solution to your input fields error handling !

    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>
            )
        }
    }