gpt4 book ai didi

javascript - 为什么未在输入字段中设置值(已使用 "value":"ddd")?

转载 作者:行者123 更新时间:2023-12-03 12:02:54 26 4
gpt4 key购买 nike

我们可以在输入字段中添加默认值吗?我制作了一个表单,将 json 转换为 form 。 http://plnkr.co/edit/ZNJO3x3IqajjdMNStJMF?p=preview我用过这个插件 https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#validation-messages

已经用过这个

"value":"dddd"

为什么它没有出现预字段或默认值?

 $scope.schema = {
type: "object",
properties: {
name: { type: "string", minLength: 2, title: "Name", description: "Name or alias" ,required:true,"value":"dddd"},
"student": { type: "string", title: "studentname", description: "Name or student" ,required:false},

"email": {
"title": "Email",
"type": "string",


"description": "Email will be used for evil.",
required:true
},
title: {
type: "string",
required:true,
enum: ['dr','jr','sir','mrs','mr','NaN','dj'],

}
}
};

我们给出不同的消息..“必需:true”。“这些字段是必填的”,当用户输入无效电子邮件时“请输入有效的电子邮件

最佳答案

而不是“value”:“dddd”默认:“dddd”

关于javascript - 为什么未在输入字段中设置值(已使用 "value":"ddd")?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25329277/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com