我设置了square connect api,我的表单提交得很好。我的问题是我正在尝试提交付款并将附加信息通过电子邮件发送给自己。如果所有内容都填写完毕,那么代码就能完美运行,但是当我调用requestCardNonce(event)时; it only requires the fields to generate the Nonce to be filled in and not the rest of the fields我甚至根据需要拥有它们。 If i remove requestCardNonce(event); all fields are required like they should be.有没有办法可以对我的所有字段进行验证以使用方形连接api?
library(shiny)
#---- Module Add dynamic tab ---
SidebarUi <- function(id) {
ns <- NS(id)
uiOutput(ns("sidebar"))
}
MainpanelUi <- function(id) {
ns <- NS(id)
uiOutput(ns("mainpanel"))
}
DynamicTabserver <- function(input, output, session) {
ns <- session$ns
output$sidebar <- renderUI({
actionButton(ns("nTabs"), label = "Add tab")
})
output$mainpanel <- renderUI({
uiOutput(ns('mytabs'))
})
output$mytabs <- renderUI({
nTabs = input$nTabs
myTabs = lapply(paste('Tab', 0:nTabs), tabPanel)
do.call(tabsetPanel, myTabs)
})
}
#---- App.R ---
ui = pageWithSidebar(headerPanel('Dynamic Tabs'),
sidebarPanel(SidebarUi("tabdemo")),
mainPanel(MainpanelUi("tabdemo")))
server = function(input, output, session) {
callModule(DynamicTabserver, "tabdemo")
}
shinyApp(ui, server)