Nodejs 验证器 revalidator

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-15 23:29:33

软件介绍

revalidator 是一款跨浏览器的 Node.js 验证器,是 resourcefulflatiron 正在使用的验证器。

示例

revalidator 的核心是很简单和简洁的: revalidator.validate(obj, schema):

  var revalidator = require('revalidator');

  console.dir(revalidator.validate(someObject, {
    properties: {
      url: {
        description: 'the url the object should be stored at',
        type: 'string',
        pattern: '^/[^#%&*{}\\:<>?\/+]+$',
        required: true
      },
      challenge: {
        description: 'a means of protecting data (insufficient for production, used as example)',
        type: 'string',
        minLength: 5
      },
      body: {
        description: 'what to store at the url',
        type: 'any',
        default: null
      }
    }
  }));

本文地址:https://codercto.com/soft/d/3674.html

Flash ActionScript 3.0从入门到精通

Flash ActionScript 3.0从入门到精通

章精设、胡登涛 / 清华大学出版社 / 2008-10-1 / 69.00元

Flash ActionScript 3.0的出现,不仅从形式上改变了ActionScript,而且从本质上改变了ActionScript,使ActionScript 3.0成为了真正的面向对象编程语言。 本书从最简单的编程知识出发,带领读者走进编程的大门,是一本不可多得的ActionScript 3.0入门书。本书在注重基础的同时,从更高的层次来介绍ActionScript 3.0的面向对......一起来看看 《Flash ActionScript 3.0从入门到精通》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具