Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vuelidate/validators

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuelidate/validators

Validators for Vuelidate

  • 2.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is @vuelidate/validators?

@vuelidate/validators is a collection of commonly used validators for Vuelidate, a model-based validation library for Vue.js. It provides a set of built-in validators that can be used to validate form inputs and other data in a Vue.js application.

What are @vuelidate/validators's main functionalities?

Required Validator

The `required` validator checks if a value is not empty. It is commonly used to ensure that a form field is filled out.

import { required } from '@vuelidate/validators';

export default {
  validations: {
    form: {
      name: { required }
    }
  }
};

Min Length Validator

The `minLength` validator checks if a string has at least a specified number of characters. It is useful for validating password lengths and other input fields that require a minimum length.

import { minLength } from '@vuelidate/validators';

export default {
  validations: {
    form: {
      password: { minLength: minLength(8) }
    }
  }
};

Email Validator

The `email` validator checks if a value is a valid email address. It is used to ensure that the input follows the standard email format.

import { email } from '@vuelidate/validators';

export default {
  validations: {
    form: {
      email: { email }
    }
  }
};

Numeric Validator

The `numeric` validator checks if a value is a number. It is useful for validating fields that should only contain numeric values.

import { numeric } from '@vuelidate/validators';

export default {
  validations: {
    form: {
      age: { numeric }
    }
  }
};

Other packages similar to @vuelidate/validators

FAQs

Package last updated on 25 Aug 2023

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc