Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

react-ui-validations

Package Overview
Dependencies
Maintainers
3
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ui-validations

Validations for @skbkontur/react-ui

Source
npmnpm
Version
2.1.6
Version published
Weekly downloads
139
595%
Maintainers
3
Weekly downloads
 
Created
Source

React UI validations

npm

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

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

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

npm install --save @skbkontur/react-ui-validations
import { ValidationContainer, ValidationWrapper } from 'react-ui-validations';

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

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

yarn start:docs

StrictMode

Библиотека поддерживает работу в React.StrictMode начиная с версии 1.7.0. Подробнее.

FAQs

Package last updated on 11 Jul 2025

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