core2-jvm (latest)
core2-jvm (latest)core-jvm
  • Home
  • Features
  • Spec
  • Guides
  • Sandbox
  • Step Studio
  • Step
    • Action
    • External
    • Help
    • Link Handler
    • Navigation
    • Persist Async
    • Polling
    • Refresh On Change
    • Schema On Change
    • Step Error
    • Suggestions
    • Summary
    • Toolbar
    • Upload
    • Validate Async
    • Schema
    • All Of Schema
    • Array Schema
    • Blob Schema
    • Boolean Schema
    • Const Schema
    • Integer Schema
    • Number Schema
    • Object Schema
    • One Of Schema
    • String Schema
    • Layout
    • Alert Layout
    • Box Layout
    • Button Layout
    • Columns Layout
    • Decision Layout
    • Divider Layout
    • Form Layout
    • Heading Layout
    • Image Layout
    • Instructions Layout
    • List Layout
    • Loading Indicator Layout
    • Markdown Layout
    • Media Layout
    • Modal Layout
    • Paragraph Layout
    • Progress Layout
    • Review Layout
    • Search Layout
    • Section Layout
    • Status List Layout
    • Tabs Layout
    • Upsell Layout
    • Behavior
    • Action Behavior
    • Copy Behavior
    • Dismiss Behavior
    • Link Behavior
    • Modal Behavior
    • Refresh Behavior
    • Subflow Behavior
    • Subflow
    • Dynamic Launch Config
    • Launch Config
    • Modal Presentation
    • Native Launch Config
    • Presentation
    • Push Presentation
    • Action Response Body
    • Error Response Body
    • Flow Response
    • Modal Response Body
    • No Op Response Body
    • Search Initial Layout Config
    • Search Initial Results Config
    • Search Initial State
    • Search Layout Response Body
    • Search Response
    • Search Response Body
    • Search Result
    • Search Results Response Body
    • Subflow Response Body
    • Additional Info
    • Align
    • Autocapitalization Type
    • Autocomplete Token
    • Context
    • Icon
    • Image
    • Inline Alert
    • Media
    • Native Capabilities
    • Request
    • Size
    • Supporting Values
    • Control
    • Tag

String Schema

Android - 8.25.0 iOS - 11539 Web - 2.5.0

Represents a string value in the submission.

This could be used for standard text input, or a format can be provided to specify a particular type of string (e.g. a date).

When not provided, the submission value is null.

obj {
    id = "#schema"
    properties {
        string("name") {
            title = "Full name"
        }
    }
}

When to use

  • When collecting textual input from a user. This can be free-text, or might be more constrained based on the validation rules and format.

When not to use

  • When only a small number of fixed values are valid, consider using a One Of Schema instead.

Formats

Date

Dates can be collected by specifying a format of date. This enforces that the submission is an ISO-8601 date string (YYYY-MM-DD). Depending on the kind of date required, it is possible to customise the component for a more natural user experience.

Date input

A date-input has 3 fields, for the day, month, and year.

obj {
    id = "#schema"
    properties {
        string("date") {
            title = "Date of Birth"
            format = StringSchema.Format.DATE
        }
    }
}
When to use
  • If the date is notable, such as a date of birth, or it is written somewhere in that format, such as on an ID card.

Date lookup

A date lookup shows a calendar view to select a date. It can be selected by providing a control of date-lookup.

obj {
    id = "#schema"
    properties {
        string("date") {
            title = "Transfer date"
            format = StringSchema.Format.DATE
            control = Control.Schema.String.DATE_LOOKUP
            placeholder = "Select a date"
            minimum = "2023-01-01"
            maximum = "2026-12-31"
        }
    }
}
When to use
  • If the date is relevant to the current day, or the day of the week, such as setting an appointment date.

Properties

PropertyTypeRequiredDescription
$idStringNoA unique id which can be used to refer to the schema.
acceptsArray<String>NoArray of MIME types the field should accept. If null, any type of file is accepted. Wildcard MIME types are allowed, but support for them varies from platform to platform. Clients must support at least image, audio, and video. Any unrecognised MIME types will be ignored.

additionalText

String

No

Additional information to be displayed to the user.

Android - Unsupported iOS - Unsupported Web - Unsupported

alertAlertLayoutNoConfigure an alert which will be displayed above the UI for this schema. This can be used to provide warnings or additional information to the user, but shouldn't be used for validation. For client-side validation please see the validation available on each schema type, or see Validate Async and Action for server-side validation.
analyticsIdStringNoAn internal id which is attached to analytics events relating to the schema. It allows you to override $id during event emission, it is not user-facing and does not have to be unique within the step.

autocapitalization

AutocapitalizationType

No

Sets the default capitalization mode of the devices virtual keyboard

Android - 8.85.0 iOS - 8.89 Web - 4.0.0

autocompleteHint

Array<AutocompleteToken>

No

A list of tokens describing to the client what kind of field it is. This can enable the user agent or assistive technologies to automatically suggest or fill in information specific to the user. Values not recognised by the client will be discarded, and clients that only support single values will take the first supported value in the list.

Android - 8.39.0 iOS - 8.40 Web - 2.5.0

autocorrect

Boolean

No

Whether the device should automatically correct the user's input. It defaults to false.

Android - Unsupported iOS - Unsupported Web - Unsupported

autofillKeyStringNoIdentifies the type of data which the client can autofill for this schema. This is provided in a . delimited string, in the format source.prop, e.g contact.email. In this example, the client should suggest values from the email property on objects retrieved from the contact source to autofill this field. The only currently supported source is contact. It will inspect contacts from the native client address book (if available). Supported properties on the contact source are: - givenName - familyName - fullName - email - firstLine - city - state - postalCode - countryCode
cameraConfigAnyNoProvide client-specific configuration for the camera capture experience.
controlStringNoAn identifier which can be used to request the client use a particular UI control to represent this schema.
defaultStringNoThe default value to use for this schema. This will be overridden by a value in the model of the Step if one is provided.
descriptionStringNoA user-facing description for the schema.
disabledBooleanNoIf true, the UI for this schema will not accept input, but the corresponding data will still be submitted. Defaults to false.
displayFormatStringNoAn input mask where a * represents a user-input character. Only the user input is submitted, not the full string.
formatStringSchema.FormatNoThe type of data the string represents.
helpHelpNoProvide additional help information to the user.
hiddenBooleanNoIf true, no UI will be shown to the user for this schema, but the corresponding data will still be submitted. Defaults to false.
iconIconNoAn icon which the client can use to represent this schema. Icons can be shown inside text input fields.
imageImageNoAn image which the client can use to represent this schema. Images can be shown inside text input fields.

inlineAlert

InlineAlert

No

An alert that will be displayed inline with the item.

Android - Unsupported iOS - Unsupported Web - Unsupported

keywordsArray<String>NoA list of keywords that can be used when searching or filtering items in a One Of Schema. Only applies when this schema is child schema in a One Of Schema.
maxLengthIntNoThe maximum length permitted for the value, if null then there is no maximum length. This is ignored if a format with a specific structure is provided (e.g. date).
maxSizeLongNoThe maximum file size in bytes. If null, file size is unlimited.
maximumStringNoThe maximum value permitted. If null then there is no maximum. This is used for formats with a specific structure (e.g. date).
mediaMediaNoA media object (avatar, icon, image) which the client can use to represent this schema. Media can be shown inside text input fields.
minLengthIntNoThe minimum length permitted for the value, if null then there is no minimum length. This is ignored if a format with a specific structure is provided (e.g. date).
minimumStringNoThe minimum value permitted. If null then there is no minimum. This is used for formats with a specific structure (e.g. date).

onChange

Behavior

No

The Behavior that should be performed when the schema value changes.

Android - 8.122.0 iOS - 8.114 Web - 4.7.0

patternStringNoA regular expression that the value must match to be valid. This is ignored if a format with a specific structure is provided (e.g. date).
persistAsyncPersistAsyncNo
placeholderStringNoA user-facing placeholder value to use for the field. This can be used to provide an example of the expected input.
refreshStepOnChangeBooleanNoWhen true, the step will be refreshed when the value of this schema changes.
sourceUpload.SourceNoValid sources for the file. If null, any source is permitted.

suggestions

Suggestions

No

Configure suggestions that the user can select to populate the schema

Android - 8.104.0 iOS - 8.98 Web - 4.5.0

summarySummary.ProviderNoConfigure how this schema will be summarised when included in an Array Schema.

supportingValues

SupportingValues

No

An object containing two strings representing two user-facing values. One being clearly more important than the other.

Android - Unsupported iOS - Unsupported Web - Unsupported

tags

Array<String>

No

An optional list of identifiers used to configure renderers.

Android - 8.131.0 iOS - 8.125 Web - 4.33.0

titleStringNoA user-facing title for the schema.
typeStringYes
validationAsyncValidateAsyncNo
validationMessagesMap<String, String>NoAn object where each property/value pair is the name of a validation property (e.g. maximum) to the user-facing error message to display if the validation fails.

Related Types

Format

Formats for string values

Values

ValueDescription
base64url
dateAn ISO-8601 formatted date

email

An email address

⚠️ Deprecated - Set control property to "email" instead

numeric

A string where all characters are numerals or .

⚠️ Deprecated - Set control property to "numeric" instead

Controls

date-lookup

Presents a calendar for date selection.

obj {
    id = "#schema"
    properties {
        string("date") {
            title = "Transfer date"
            format = StringSchema.Format.DATE
            control = Control.Schema.String.DATE_LOOKUP
            placeholder = "Select a date"
            minimum = "2023-01-01"
            maximum = "2026-12-31"
        }
    }
}

email

Use an input suitable for email entry. Note that this does not provide validation. Please use the pattern property with an appropriate regex for email validation.

numeric

Use an input suitable for entering a string of numbers.

password

Use a secure control intended for entering secrets such as password.

obj {
    id = "#schema"
    properties {
        string("password") {
            title = "Password"
            control = Control.Schema.String.PASSWORD
            autocompleteHint(AutocompleteToken.PASSWORD)
        }
    }
}

phone-number

Use an input suitable for phone number entry.

obj {
    id = "#schema"
    properties {
        string("phone") {
            title = "Phone number"
            control = Control.Schema.String.PHONE_NUMBER
            autocompleteHint(AutocompleteToken.PHONE_NUMBER)
        }
    }
}

sharable

Use a component that allows sharing the provided content. e.g: images

textarea

Use an input suitable for multi-line text input.

obj {
    id = "#schema"
    properties {
        string("feedback") {
            title = "Please leave your comments below"
            control = Control.Schema.String.TEXTAREA
        }
    }
}