rfm

riot-form-mixin

a micro form validate mixin, base Riotjs

Showing:

Popularity

Downloads/wk

1

GitHub Stars

1

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

1.9KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

riot-form

this is a riot form mixin

###Install npm install riot-form-mixin

###Usage

<test>
    <form name="my_form">
        <input required/>
    </form>
    <script>
        this.mixin('form');
        this.useForm();
        //...
    </script>
</test>

###Validators

####Built-in validators

type="email"
type="url"
type="number"
required
minlength
maxlength
pattern
min (for type="number")
max (for type="number")

####Associated state classes

.f-invalid .f-valid

when error:

.f-invalid-required .f-invalid-max ...

####Custom validator

registerValidators({
    name: 'custom-validator',
    fn: function(){
        return ...
    }
})

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100