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

@jdfed/drip-form-plugin-formats

Package Overview
Dependencies
Maintainers
5
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jdfed/drip-form-plugin-formats

drip-form ajv formats插件

  • 0.9.0-alpha.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-89.09%
Maintainers
5
Weekly downloads
 
Created
Source

@jdfed/drip-form-plugin-formats

drip-form 官方formats插件,目前有date-time、color

date-time: /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)$/i正则校验。例子:2020-09-17 12:00:00

color: 校验rgba、rgb、hex三种格式颜色 例子:rgba(0,0,0,1)、rgba(0,0,0)、#000000

Usage

const addFormats = require('@jdfed/drip-form-plugin-default');
cont Ajv = require('ajv')
const ajv = new Ajv()

//添加所有formats
addFormats(ajv) 
//添加指定formats
addFormats(ajv,['color'])

Keywords

FAQs

Package last updated on 14 Dec 2022

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