Required field validation is not working in Site

Certified Senior Developer

Required field validation is working fine in the interface and portal.

But in Site the same interface is not showing "A value is required"..

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Can you share the Code snippet

  • 0
    Certified Senior Developer
    in reply to Venkat Avuluri

    a!textField(
    label: "First Name",
    labelPosition: "ADJACENT",
    placeholder: "Enter First Name",
    value: ri!accessDetails.firstname,
    saveInto: {ri!accessDetails.firstname},
    refreshAfter: "UNFOCUS",
    required: true,
    validations: {
    if(
    isnull(
    cleanwith(
    ri!accessDetails.firstName,
    "1234567890"
    )
    ),
    null,
    "Please enter a valid name"
    ),
    if(
    like(ri!accessDetails.firstname," "),
    "Please enter a valid name",
    null
    )
    }
    )
    //For the text field

    a!buttonLayout(
    primaryButtons: a!buttonWidget(
    label: "SUBMIT",
    value: 3,
    saveInto: {
    a!startProcess(
    processModel: cons!GMA_CALL_ACCESS_DETAILS_PM,
    processParameters: {
    accessDetails: ri!accessDetails
    }
    )
    },
    submit: true,
    size: "STANDARD",
    color: "ACCENT",
    validate: true
    )
    )
    //For button

Reply
  • 0
    Certified Senior Developer
    in reply to Venkat Avuluri

    a!textField(
    label: "First Name",
    labelPosition: "ADJACENT",
    placeholder: "Enter First Name",
    value: ri!accessDetails.firstname,
    saveInto: {ri!accessDetails.firstname},
    refreshAfter: "UNFOCUS",
    required: true,
    validations: {
    if(
    isnull(
    cleanwith(
    ri!accessDetails.firstName,
    "1234567890"
    )
    ),
    null,
    "Please enter a valid name"
    ),
    if(
    like(ri!accessDetails.firstname," "),
    "Please enter a valid name",
    null
    )
    }
    )
    //For the text field

    a!buttonLayout(
    primaryButtons: a!buttonWidget(
    label: "SUBMIT",
    value: 3,
    saveInto: {
    a!startProcess(
    processModel: cons!GMA_CALL_ACCESS_DETAILS_PM,
    processParameters: {
    accessDetails: ri!accessDetails
    }
    )
    },
    submit: true,
    size: "STANDARD",
    color: "ACCENT",
    validate: true
    )
    )
    //For button

Children
No Data