1.0.9 • Published 1 year ago

@jswork/mantine-form-validators v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year 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

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago