Socket
Socket
Sign inDemoInstall

@coffeekraken/s-form-validate-feature

Package Overview
Dependencies
7
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coffeekraken/s-form-validate-feature

Powerful feature that you can use to validate your form inputs using rules like "password", "min", "email", and a lot more...


Version published
Maintainers
1
Weekly downloads
191
increased by50.39%

Weekly downloads

Readme

Source

{{#> layout-readme }}

SFormValidateFeature

This package expose a simple SFormValidateFeature class that allows you to validate your forms before sending them to your backend.

Features

  • Validate your field and display an error message if needed
  • Prevent your form to be submited when an error occurs
  • Built-in validators like email, min, max, pattern, etc...
  • Support custom validators through the @coffeekraken/s-validator package
  • Custom inline error message support
  • And more...

Usage

Here's how to import and make use of this feature:

import { define } from '@coffeekraken/s-form-validate-feature';
define({
    // some default props...
});
Simple email validation
<label class="s-label:responsive" s-form-validate email>
    Email address
    <input
        type="text"
        class="s-input s-width:60"
        placeholder="olivier.bossel@coffeekraken.io"
    />
</label>
Inline message
<label
    class="s-label:responsive"
    s-form-validate
    email
    email-message="Something goes wrong"
>
    Email address
    <input
        type="text"
        class="s-input s-width:60"
        placeholder="olivier.bossel@coffeekraken.io"
    />
</label>

Properties

{{> interface namespace='@coffeekraken.s-form-validate-feature.js.interface.SFormValidateFeatureInterface' }}

Note that to pass properties using html attributes, you must use the dashCase case...

API

For more information about the API, please check out the API documentation

{{/ layout-readme }}

FAQs

Last updated on 18 Aug 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc