1.0.9 • Published 10 months ago

@jswork/mantine-form-validators v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

mantine-form-validators

Validate rule manager.

version license size download

installation

npm install -S @jswork/mantine-form-validators

usage

  1. import css

    @import "~@jswork/mantine-form-validators/dist/style.css";
    
    // or use sass
    @import "~@jswork/mantine-form-validators/dist/style.scss";
    
    // customize your styles:
    $mantine-form-validators-options: ()
  2. import js

    import React from 'react';
    import MantineFormValidators from '../../src/main';
    import styled from 'styled-components';
    import { scanVite } from '@jswork/scan-modules';
    
    const Container = styled.div`
      width: 80%;
      margin: 30px auto 0;
    `;
    
    export default () => {
      const moduleFiles = import.meta.glob('./shared/rules/**/*.ts', { eager: true });
      const modules = scanVite(moduleFiles, { modules: '/rules/' }) as any;
    
      return (
        <Container>
          <MantineFormValidators modules={modules} />
        </Container>
      );
    };

preview

license

Code released under the MIT license.

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago