Input Field Validation Patterns in Block Steps


#1

Hey!

Here’s something one of my engineers was asking about today – we want to do some validation on the text that is entered in a block step input field, to ensure that it fits a certain pattern such as an email address or URL. It would be great to be able to specify that in our pipeline definition, rather than as a pre-command validation command.

I’m thinking something like this, assuming the buildkite-agent’s YAML parser respects single quote literal strings:

steps:
  - block: "Onboard me!"
    fields:
      - text: "Email address"
        key: "email"
        required: true
        pattern: '\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b'