How do I validate IP address for a textfield

Certified Lead Developer

I have a text field on which I want to have validations for IP address

  Discussion posts and replies are publicly visible

Parents Reply
  • Suggest you to try below code
    a!textField(
    value:ri!testing,
    saveInto: ri!testing,
    validations: {
    if(regexmatch("^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",ri!testing),"True message","False message")
    },
    refreshAfter: "KEYPRESS"
    )
    By using regexmatch() function,try to install Appian Regular Expression Function plugin.
Children
No Data