🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-ui-validations

Package Overview
Dependencies
Maintainers
3
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ui-validations

Validations for retail-ui

0.2.14-alpha11
Source
npm
Version published
Weekly downloads
70
-51.39%
Maintainers
3
Weekly downloads
 
Created
Source

react-ui-validations

Travis npm

Набор компонентов, реализующих поведение валидаций по контур-гайдам.

Документация

Использование

npm install --save react-ui-validations
import { ValidationContainer, ValidationWrapperV1 } from 'react-ui-validations';

export default class DataEditor extends React.Component {
    // ...
    render() {
        return (
            <ValidationContainer>
                <ValidationWrapperV1 
                    validationInfo={/\d+/.test(phone) 
                        ? { message: 'Телефон должен состоять только из цифр' } 
                        : null}>
                    <Input
                        value={phone}
                        onChange={value => setState({ phone: value })}
                    />
                </ValidationWrapperV1>
            </ValidationContainer>
        );
    }
}

Запуск примеров

git clone git@github.com:skbkontur/react-ui-validations.git
cd react-ui-validations
npm install
cd docs
npm install
npm start

FAQs

Package last updated on 24 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts