首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏汇智网教程

    fabric private data实战 原

    stubHelper: StubHelper, args: string[]) { const verifiedArgs = await Helpers.checkArgs<any>(args[0], Yup.object () .shape({ key: Yup.string().required(), make: Yup.string().required (), model: Yup.string().required(), color: Yup.string().required(), owner: Yup.string().required(), })); let car = { docType: 'car', () .shape({ key: Yup.string().required(), })); const car = await

    1.2K20发布于 2019-05-10
  • 来自专栏webTower

    React 组件优化

    使用时需要先下载: npm install formik --save Formik 库可以与 yup 库一块使用,库的作者也推荐搭配使用,yup 是一个用于验证字段的库,它的用法类似于 React 中的 yup 库使用之前也需要先下载。 用法 下面写个例子,一个表单,我们需要表单做验证,验证不通过就提示用户为什么不对。 使用 Formik + yup 库实现了验证逻辑与组件的解耦,验证逻辑统一由 yup 管理。 相对于 redux-form 库,我觉得 formik 库更好用一些吧。 redux-form 库比较大,压缩后大小为 22.5KB,而 Formik 库为 12.7KB; 关于 formik 的更多用法,可以参考官网: Formik.js[1] yup.js[2] 参考资料 [1] Formik.js: https://jaredpalmer.com/formik/docs/overview [2] yup.js: https://github.com/jquense/yup

    8.8K20发布于 2020-04-27
  • 来自专栏极客编程

    Fabric private data入门实战

    stubHelper: StubHelper, args: string[]) { const verifiedArgs = await Helpers.checkArgs<any>(args[0], Yup.object () .shape({ key: Yup.string().required(), make: Yup.string().required (), model: Yup.string().required(), color: Yup.string().required(), owner: Yup.string().required(), })); let car = { docType: 'car', () .shape({ key: Yup.string().required(), })); const car = await

    1.7K40发布于 2019-05-10
  • 来自专栏腾讯新闻前端团队

    30个有用的npm包

    var validator = require('validator'); validator.isEmail('foo@bar.com'); //=> true 8.yup yup是一个用于复杂的、相互依赖的验证和转换的模式构建器 import * as yup from 'yup'; let schema = yup.object().shape({ name: yup.string().required(), age: yup.number().required().positive().integer(), email: yup.string().email(), website: yup.string() .url(), createdOn: yup.date().default(function () { return new Date(); }), }); // check validity

    3.9K30发布于 2021-08-30
  • 来自专栏人工智能应用

    React编程新手入门实践教程

    6.2 表单验证策略 即时验证:onChange时检查 提交验证:onSubmit时统一检查 第三方库:Formik + Yup组合 // Yup验证模式 const schema = Yup.object({ email: Yup.string().email('无效邮箱').required('必填'), password: Yup.string().min(8, '密码过短

    37400编辑于 2025-08-01
  • 来自专栏历史专栏

    【愚公系列】2022年05月 vue3系列 store的装饰器使用封装(TS版)

    useRouter } from "vue-router"; import Swal from "sweetalert2/dist/sweetalert2.min.js"; import * as Yup from "yup"; export default defineComponent({ name: "sign-in", components: { Field, Form useRouter(); const submitButton = ref<HTMLElement | null>(null); //创建表单验证对象 const login = Yup.object ().shape({ email: Yup.string() .email() .required() .label("Email"), password: Yup.string() .min(4) .required() .label("Password") }); //

    2K31编辑于 2022-05-20
  • 来自专栏畅所欲言

    简约好看自适应404错误页面源码

    简约好看自适应404错误页面源码 源码截图 预览地址:https://pigfei.gitee.io/pages-404/ 微云 链接: https://share.weiyun.com/lUuh2yUp

    1.2K10发布于 2020-07-28
  • 来自专栏cc log

    前端元编程——使用注解加速你的前端开发

    Form表单我们使用Formik + Tea Form Component + yup(数据校验)。 </TeaForm.Item> ) } } </Field> ) } 照猫画虎,我们还是先收集form所需的元数据 import * as Yup from 'yup'; export interface FormPropertyConfig { validationSchema? @Type({ handle: 'ID' }) id: number = 0 @Form({ label:"Name", validationSchema: Yup.string initValue:'test name' }) name:string = '' @Form({ label:"Age", validationSchema: Yup.string

    3.9K20编辑于 2022-09-21
  • 来自专栏量化投资与机器学习

    卷积神经网络反向传播推导

    However, in the standard approach we talk about dot products and here we have … yup, again convolution both in feed forward and backpropagation. you know that seeing something and understanding something … yup

    1.2K100发布于 2018-01-30
  • 来自专栏sql与spec性能

    SPEC2006编译安装

    *xyz' testcpp.out >/dev/null 2>&1 ; then echo "Yup, it does." *xyz' testcpp.out >/dev/null 2>&1 ; then echo "Yup, it does." *xyz' testcpp.out >/dev/null 2>&1 ; then+ echo "Yup, it does. *xyz' testcpp.out >/dev/null 2>&1 ; then+ echo "Yup, it does.

    1.5K11编辑于 2023-10-26
  • 来自专栏VTeam技术团队

    前端元编程——使用注解加速你的前端开发

    Form表单我们使用Formik + Tea Form Component + yup(数据校验)。 Field> )} 照猫画虎,我们还是先收集form所需的元数据 import * as Yup from 'yup'; export interface FormPropertyConfig { validationSchema? unknow']; @Type({ handle: 'ID' }) id: number = 0 @Form({ label:"Name", validationSchema: Yup.string true, initValue:'test name' }) name:string = '' @Form({ label:"Age", validationSchema: Yup.string

    4.2K20发布于 2020-11-23
  • 来自专栏Web 技术

    整理了一份 Javascript 代码书写规范

    var test; if (currentUser) { test = function test() { console.log('Yup.'); }; } (3)参数arguments // bad function nope(name, options, arguments) { // ...stuff... } // good function yup(name, options 命名你的构造函数或类 function User(options) { this.name = options.name; } var good = new User({ name: 'yup

    47730编辑于 2023-10-07
  • 来自专栏机器学习/数据可视化

    基于LDA算法的Twitter文本分析

    19NaNelonmusk1Row1RT @SpaceX: BFR is capable of transporting sat...2017-09-29 10:44:54SpaceXelonmusk2Row2@bigajm Yup 19NaNelonmusk1Row1RT @SpaceX: BFR is capable of transporting sat...2017-09-29 10:44:54SpaceXelonmusk2Row2@bigajm Yup , '@bigajm Yup :)', 'Part 2 https://t.co/8Fvu57muhM', 'Fly to most places on Earth in under 30 mins and

    34310编辑于 2024-06-04
  • 来自专栏大数据文摘

    2016年度十大新兴技术出炉,你最看好哪个?

    韩国前沿科技研究所特聘教授Sang Yup Lee在发布会上表示,今年选中的新兴技术与往年相比,生物科学类要更突出,且除了考量不同技术对人类的好处外,也更顾及其对环境的影响。 Sang Yup Lee说。

    47370发布于 2018-05-22
  • 来自专栏IT综合技术分享

    组件分享之前端组件——用于表单状态管理和验证的 React Hooks (Web + React Native)

    本次分享的用于表单状态管理和验证的 React Hooks (Web + React Native),在其构建时考虑到性能、UX 和 DX,采用原生 HTML 表单验证,与UI 库的开箱即用集成,体积小,无依赖,支持Yup

    5.5K10编辑于 2022-05-20
  • 来自专栏python3

    Python 3.7 新特性概览(附实例

    = input("Try to guess our favourite IC >>> ") if user_guess == favourite_ic: return "Yup guess our favourite IC >>> ") breakpoint() if user_guess == favourite_ic: return "Yup guess our favourite IC >>> ") breakpoint() if user_guess == favourite_ic: return "Yup

    1.1K30发布于 2020-01-06
  • 来自专栏front-end technology

    ES6中也要使用好严格的代码规范,助力你写出优雅的代码

    .'); } } // good if (currentUser) { var test = function test() { console.log('Yup.'); }; } arguments 对象 // bad function nope(name, options, arguments) { // ...stuff... } // good function yup

    93730发布于 2019-07-31
  • 来自专栏johnhuster

    多个模态框框,当关闭某一个的时候, body 上面的Class modal-open 被移除了

    if(result) { alert('Yup

    81410编辑于 2022-03-28
  • 来自专栏用户10004205的专栏

    Unity & CityEngine 根据地图中建筑矢量数据批量建模

    alignScopeToAxes(y) s('1,0,'1) # make it horizontal i.e. scale it flat alignScopeToGeometry(yUp Extrusion(height,constructRoof,maxLength) --> convexify(maxLength) comp(f){ all: alignScopeToGeometry(yUp

    1.3K20编辑于 2022-08-29
  • 来自专栏卓越笔记

    fiddler oSession 方法等收集(发送请求、保存到文件)

    oSession["ui-hide"] = "true"; // 不显示 oSession["ui-bold"]="true";  // 字体加粗 oSession["ui-italic"] = "yup

    1.5K20编辑于 2023-02-18
领券