pub struct AutofillHints;Expand description
A collection of commonly used autofill hint strings on different platforms.
Each hint is pre-defined on at least one supported platform. See their documentation for their availability on each platform, and the platform values each autofill hint corresponds to.
Implementations§
Source§impl AutofillHints
impl AutofillHints
Sourcepub const ADDRESS_CITY: &str = "addressCity"
pub const ADDRESS_CITY: &str = "addressCity"
The input field expects an address locality (city/town).
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_ADDRESS_LOCALITY.
- iOS: addressCity.
- Otherwise, the hint string will be used as-is.
Sourcepub const ADDRESS_CITY_AND_STATE: &str = "addressCityAndState"
pub const ADDRESS_CITY_AND_STATE: &str = "addressCityAndState"
The input field expects a city name combined with a state name.
This hint will be translated to the below values on different platforms:
- iOS: addressCityAndState.
- Otherwise, the hint string will be used as-is.
Sourcepub const ADDRESS_STATE: &str = "addressState"
pub const ADDRESS_STATE: &str = "addressState"
The input field expects a region/state.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_ADDRESS_REGION.
- iOS: addressState.
- Otherwise, the hint string will be used as-is.
Sourcepub const BIRTHDAY: &str = "birthday"
pub const BIRTHDAY: &str = "birthday"
The input field expects a person’s full birth date.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_BIRTH_DATE_FULL.
- web: “bday”.
- Otherwise, the hint string will be used as-is.
Sourcepub const BIRTHDAY_DAY: &str = "birthdayDay"
pub const BIRTHDAY_DAY: &str = "birthdayDay"
The input field expects a person’s birth day(of the month).
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_BIRTH_DATE_DAY.
- web: “bday-day”.
- Otherwise, the hint string will be used as-is.
Sourcepub const BIRTHDAY_MONTH: &str = "birthdayMonth"
pub const BIRTHDAY_MONTH: &str = "birthdayMonth"
The input field expects a person’s birth month.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_BIRTH_DATE_MONTH.
- web: “bday-month”.
- Otherwise, the hint string will be used as-is.
Sourcepub const BIRTHDAY_YEAR: &str = "birthdayYear"
pub const BIRTHDAY_YEAR: &str = "birthdayYear"
The input field expects a person’s birth year.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_BIRTH_DATE_YEAR.
- web: “bday-year”.
- Otherwise, the hint string will be used as-is.
Sourcepub const COUNTRY_CODE: &str = "countryCode"
pub const COUNTRY_CODE: &str = "countryCode"
The input field expects an ISO 3166-1-alpha-2 country code.
This hint will be translated to the below values on different platforms:
- web: “country”.
- Otherwise, the hint string will be used as-is.
Sourcepub const COUNTRY_NAME: &str = "countryName"
pub const COUNTRY_NAME: &str = "countryName"
The input field expects a country name.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_ADDRESS_COUNTRY.
- iOS: countryName.
- web: “country-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_EXPIRATION_DATE: &str = "creditCardExpirationDate"
pub const CREDIT_CARD_EXPIRATION_DATE: &str = "creditCardExpirationDate"
The input field expects a credit card expiration date.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_CREDIT_CARD_NUMBER.
- web: “cc-exp”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_EXPIRATION_DAY: &str = "creditCardExpirationDay"
pub const CREDIT_CARD_EXPIRATION_DAY: &str = "creditCardExpirationDay"
The input field expects a credit card expiration day.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_EXPIRATION_MONTH: &str = "creditCardExpirationMonth"
pub const CREDIT_CARD_EXPIRATION_MONTH: &str = "creditCardExpirationMonth"
The input field expects a credit card expiration month.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH.
- web: “cc-exp-month”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_EXPIRATION_YEAR: &str = "creditCardExpirationYear"
pub const CREDIT_CARD_EXPIRATION_YEAR: &str = "creditCardExpirationYear"
The input field expects a credit card expiration year.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR.
- web: “cc-exp-year”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_FAMILY_NAME: &str = "creditCardFamilyName"
pub const CREDIT_CARD_FAMILY_NAME: &str = "creditCardFamilyName"
The input field expects the holder’s last/family name as given on a credit card.
This hint will be translated to the below values on different platforms:
- web: “cc-family-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_GIVEN_NAME: &str = "creditCardGivenName"
pub const CREDIT_CARD_GIVEN_NAME: &str = "creditCardGivenName"
The input field expects the holder’s first/given name as given on a credit card.
This hint will be translated to the below values on different platforms:
- web: “cc-given-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_MIDDLE_NAME: &str = "creditCardMiddleName"
pub const CREDIT_CARD_MIDDLE_NAME: &str = "creditCardMiddleName"
The input field expects the holder’s middle name as given on a credit card.
This hint will be translated to the below values on different platforms:
- web: “cc-additional-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_NAME: &str = "creditCardName"
pub const CREDIT_CARD_NAME: &str = "creditCardName"
The input field expects the holder’s full name as given on a credit card.
This hint will be translated to the below values on different platforms:
- web: “cc-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_NUMBER: &str = "creditCardNumber"
pub const CREDIT_CARD_NUMBER: &str = "creditCardNumber"
The input field expects a credit card number.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_CREDIT_CARD_NUMBER.
- iOS: creditCardNumber.
- web: “cc-number”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_SECURITY_CODE: &str = "creditCardSecurityCode"
pub const CREDIT_CARD_SECURITY_CODE: &str = "creditCardSecurityCode"
The input field expects a credit card security code.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE.
- web: “cc-csc”.
- Otherwise, the hint string will be used as-is.
Sourcepub const CREDIT_CARD_TYPE: &str = "creditCardType"
pub const CREDIT_CARD_TYPE: &str = "creditCardType"
The input field expects the type of a credit card, for example “Visa”.
This hint will be translated to the below values on different platforms:
- web: “cc-type”.
- Otherwise, the hint string will be used as-is.
Sourcepub const EMAIL: &str = "email"
pub const EMAIL: &str = "email"
The input field expects an email address.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_EMAIL_ADDRESS.
- iOS: emailAddress.
- web: “email”.
- Otherwise, the hint string will be used as-is.
Sourcepub const FAMILY_NAME: &str = "familyName"
pub const FAMILY_NAME: &str = "familyName"
The input field expects a person’s last/family name.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PERSON_NAME_FAMILY.
- iOS: familyName.
- web: “family-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const FULL_STREET_ADDRESS: &str = "fullStreetAddress"
pub const FULL_STREET_ADDRESS: &str = "fullStreetAddress"
The input field expects a street address that fully identifies a location.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_ADDRESS_STREET_ADDRESS.
- iOS: fullStreetAddress.
- web: “street-address”.
- Otherwise, the hint string will be used as-is.
Sourcepub const GENDER: &str = "gender"
pub const GENDER: &str = "gender"
The input field expects a gender.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_GENDER.
- web: “sex”.
- Otherwise, the hint string will be used as-is.
Sourcepub const GIVEN_NAME: &str = "givenName"
pub const GIVEN_NAME: &str = "givenName"
The input field expects a person’s first/given name.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PERSON_NAME_GIVEN.
- iOS: givenName.
- web: “given-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const IMPP: &str = "impp"
pub const IMPP: &str = "impp"
The input field expects a URL representing an instant messaging protocol endpoint.
This hint will be translated to the below values on different platforms:
- web: “impp”.
- Otherwise, the hint string will be used as-is.
Sourcepub const JOB_TITLE: &str = "jobTitle"
pub const JOB_TITLE: &str = "jobTitle"
The input field expects a job title.
This hint will be translated to the below values on different platforms:
- iOS: jobTitle.
- web: “organization-title”.
- Otherwise, the hint string will be used as-is.
Sourcepub const LANGUAGE: &str = "language"
pub const LANGUAGE: &str = "language"
The input field expects the preferred language of the user.
This hint will be translated to the below values on different platforms:
- web: “language”.
- Otherwise, the hint string will be used as-is.
Sourcepub const LOCATION: &str = "location"
pub const LOCATION: &str = "location"
The input field expects a location, such as a point of interest, an address,or another way to identify a location.
This hint will be translated to the below values on different platforms:
- iOS: location.
- Otherwise, the hint string will be used as-is.
Sourcepub const MIDDLE_INITIAL: &str = "middleInitial"
pub const MIDDLE_INITIAL: &str = "middleInitial"
The input field expects a person’s middle initial.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PERSON_NAME_MIDDLE_INITIAL.
- Otherwise, the hint string will be used as-is.
Sourcepub const MIDDLE_NAME: &str = "middleName"
pub const MIDDLE_NAME: &str = "middleName"
The input field expects a person’s middle name.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PERSON_NAME_MIDDLE.
- iOS: middleName.
- web: “additional-name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const NAME: &str = "name"
pub const NAME: &str = "name"
The input field expects a person’s full name.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PERSON_NAME.
- iOS: name.
- web: “name”.
- Otherwise, the hint string will be used as-is.
Sourcepub const NAME_PREFIX: &str = "namePrefix"
pub const NAME_PREFIX: &str = "namePrefix"
The input field expects a person’s name prefix or title, such as “Dr.”.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PERSON_NAME_PREFIX.
- iOS: namePrefix.
- web: “honorific-prefix”.
- Otherwise, the hint string will be used as-is.
Sourcepub const NAME_SUFFIX: &str = "nameSuffix"
pub const NAME_SUFFIX: &str = "nameSuffix"
The input field expects a person’s name suffix, such as “Jr.”.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PERSON_NAME_SUFFIX.
- iOS: nameSuffix.
- web: “honorific-suffix”.
- Otherwise, the hint string will be used as-is.
Sourcepub const NEW_PASSWORD: &str = "newPassword"
pub const NEW_PASSWORD: &str = "newPassword"
The input field expects a newly created password for save/update.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_NEW_PASSWORD.
- iOS: newPassword.
- web: “new-password”.
- Otherwise, the hint string will be used as-is.
Sourcepub const NEW_USERNAME: &str = "newUsername"
pub const NEW_USERNAME: &str = "newUsername"
The input field expects a newly created username for save/update.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_NEW_USERNAME.
- Otherwise, the hint string will be used as-is.
Sourcepub const NICKNAME: &str = "nickname"
pub const NICKNAME: &str = "nickname"
The input field expects a nickname.
This hint will be translated to the below values on different platforms:
- iOS: nickname.
- web: “nickname”.
- Otherwise, the hint string will be used as-is.
Sourcepub const ONE_TIME_CODE: &str = "oneTimeCode"
pub const ONE_TIME_CODE: &str = "oneTimeCode"
The input field expects a SMS one-time code.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_SMS_OTP.
- iOS: oneTimeCode.
- web: “one-time-code”.
- Otherwise, the hint string will be used as-is.
Sourcepub const EMAIL_OTP_CODE: &str = "emailOTPCode"
pub const EMAIL_OTP_CODE: &str = "emailOTPCode"
The input field expects an email one-time code.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_EMAIL_OTP.
- Otherwise, the hint string will be used as-is.
Sourcepub const ORGANIZATION_NAME: &str = "organizationName"
pub const ORGANIZATION_NAME: &str = "organizationName"
The input field expects an organization name corresponding to the person, address, or contact information in the other fields associated with this field.
This hint will be translated to the below values on different platforms:
- iOS: organizationName.
- web: “organization”.
- Otherwise, the hint string will be used as-is.
Sourcepub const PASSWORD: &str = "password"
pub const PASSWORD: &str = "password"
The input field expects a password.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PASSWORD.
- iOS: password.
- web: “current-password”.
- Otherwise, the hint string will be used as-is.
Sourcepub const PHOTO: &str = "photo"
pub const PHOTO: &str = "photo"
The input field expects a photograph, icon, or other image corresponding to the company, person, address, or contact information in the other fields associated with this field.
This hint will be translated to the below values on different platforms:
- web: “photo”.
- Otherwise, the hint string will be used as-is.
Sourcepub const POSTAL_ADDRESS: &str = "postalAddress"
pub const POSTAL_ADDRESS: &str = "postalAddress"
The input field expects a postal address.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_ADDRESS.
- Otherwise, the hint string will be used as-is.
Sourcepub const POSTAL_ADDRESS_EXTENDED: &str = "postalAddressExtended"
pub const POSTAL_ADDRESS_EXTENDED: &str = "postalAddressExtended"
The input field expects an auxiliary address details.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_ADDRESS.
- Otherwise, the hint string will be used as-is.
Sourcepub const POSTAL_ADDRESS_EXTENDED_POSTAL_CODE: &str = "postalAddressExtendedPostalCode"
pub const POSTAL_ADDRESS_EXTENDED_POSTAL_CODE: &str = "postalAddressExtendedPostalCode"
The input field expects an extended ZIP/POSTAL code.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_ADDRESS_EXTENDED_POSTAL_CODE.
- Otherwise, the hint string will be used as-is.
Sourcepub const POSTAL_CODE: &str = "postalCode"
pub const POSTAL_CODE: &str = "postalCode"
The input field expects a postal code.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_POSTAL_CODE.
- iOS: postalCode.
- web: “postal-code”.
- Otherwise, the hint string will be used as-is.
Sourcepub const STREET_ADDRESS_LEVEL1: &str = "streetAddressLevel1"
pub const STREET_ADDRESS_LEVEL1: &str = "streetAddressLevel1"
The first administrative level in the address. This is typically the province in which the address is located. In the United States, this would be the state. In Switzerland, the canton. In the United Kingdom, the post town.
This hint will be translated to the below values on different platforms:
- web: “address-level1”.
- Otherwise, the hint string will be used as-is.
Sourcepub const STREET_ADDRESS_LEVEL2: &str = "streetAddressLevel2"
pub const STREET_ADDRESS_LEVEL2: &str = "streetAddressLevel2"
The second administrative level, in addresses with at least two of them. In countries with two administrative levels, this would typically be the city, town, village, or other locality in which the address is located.
This hint will be translated to the below values on different platforms:
- web: “address-level2”.
- Otherwise, the hint string will be used as-is.
Sourcepub const STREET_ADDRESS_LEVEL3: &str = "streetAddressLevel3"
pub const STREET_ADDRESS_LEVEL3: &str = "streetAddressLevel3"
The third administrative level, in addresses with at least three administrative levels.
This hint will be translated to the below values on different platforms:
- web: “address-level3”.
- Otherwise, the hint string will be used as-is.
Sourcepub const STREET_ADDRESS_LEVEL4: &str = "streetAddressLevel4"
pub const STREET_ADDRESS_LEVEL4: &str = "streetAddressLevel4"
The finest-grained administrative level, in addresses which have four levels.
This hint will be translated to the below values on different platforms:
- web: “address-level4”.
- Otherwise, the hint string will be used as-is.
Sourcepub const STREET_ADDRESS_LINE1: &str = "streetAddressLine1"
pub const STREET_ADDRESS_LINE1: &str = "streetAddressLine1"
The input field expects the first line of a street address.
This hint will be translated to the below values on different platforms:
- iOS: streetAddressLine1.
- web: “address-line1”.
- Otherwise, the hint string will be used as-is.
Sourcepub const STREET_ADDRESS_LINE2: &str = "streetAddressLine2"
pub const STREET_ADDRESS_LINE2: &str = "streetAddressLine2"
The input field expects the second line of a street address.
This hint will be translated to the below values on different platforms:
- iOS: streetAddressLine2. As of iOS 14.2 this hint does not trigger autofill.
- web: “address-line2”.
- Otherwise, the hint string will be used as-is.
Sourcepub const STREET_ADDRESS_LINE3: &str = "streetAddressLine3"
pub const STREET_ADDRESS_LINE3: &str = "streetAddressLine3"
The input field expects the third line of a street address.
This hint will be translated to the below values on different platforms:
- web: “address-line3”.
- Otherwise, the hint string will be used as-is.
Sourcepub const SUBLOCALITY: &str = "sublocality"
pub const SUBLOCALITY: &str = "sublocality"
The input field expects a sublocality.
This hint will be translated to the below values on different platforms:
- iOS: sublocality.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER: &str = "telephoneNumber"
pub const TELEPHONE_NUMBER: &str = "telephoneNumber"
The input field expects a telephone number.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PHONE_NUMBER.
- iOS: telephoneNumber.
- web: “tel”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_AREA_CODE: &str = "telephoneNumberAreaCode"
pub const TELEPHONE_NUMBER_AREA_CODE: &str = "telephoneNumberAreaCode"
The input field expects a phone number’s area code, with a country -internal prefix applied if applicable.
This hint will be translated to the below values on different platforms:
- web: “tel-area-code”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_COUNTRY_CODE: &str = "telephoneNumberCountryCode"
pub const TELEPHONE_NUMBER_COUNTRY_CODE: &str = "telephoneNumberCountryCode"
The input field expects a phone number’s country code.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PHONE_COUNTRY_CODE.
- web: “tel-country-code”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_DEVICE: &str = "telephoneNumberDevice"
pub const TELEPHONE_NUMBER_DEVICE: &str = "telephoneNumberDevice"
The input field expects the current device’s phone number, usually for Sign Up / OTP flows.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PHONE_NUMBER_DEVICE.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_EXTENSION: &str = "telephoneNumberExtension"
pub const TELEPHONE_NUMBER_EXTENSION: &str = "telephoneNumberExtension"
The input field expects a phone number’s internal extension code.
This hint will be translated to the below values on different platforms:
- web: “tel-extension”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_LOCAL: &str = "telephoneNumberLocal"
pub const TELEPHONE_NUMBER_LOCAL: &str = "telephoneNumberLocal"
The input field expects a phone number without the country code and area code components.
This hint will be translated to the below values on different platforms:
- web: “tel-local”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_LOCAL_PREFIX: &str = "telephoneNumberLocalPrefix"
pub const TELEPHONE_NUMBER_LOCAL_PREFIX: &str = "telephoneNumberLocalPrefix"
The input field expects the first part of the component of the telephone number that follows the area code, when that component is split into two components.
This hint will be translated to the below values on different platforms:
- web: “tel-local-prefix”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_LOCAL_SUFFIX: &str = "telephoneNumberLocalSuffix"
pub const TELEPHONE_NUMBER_LOCAL_SUFFIX: &str = "telephoneNumberLocalSuffix"
The input field expects the second part of the component of the telephone number that follows the area code, when that component is split into two components.
This hint will be translated to the below values on different platforms:
- web: “tel-local-suffix”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TELEPHONE_NUMBER_NATIONAL: &str = "telephoneNumberNational"
pub const TELEPHONE_NUMBER_NATIONAL: &str = "telephoneNumberNational"
The input field expects a phone number without country code.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_PHONE_NATIONAL.
- web: “tel-national”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TRANSACTION_AMOUNT: &str = "transactionAmount"
pub const TRANSACTION_AMOUNT: &str = "transactionAmount"
The amount that the user would like for the transaction (e.g. when entering a bid or sale price).
This hint will be translated to the below values on different platforms:
- web: “transaction-amount”.
- Otherwise, the hint string will be used as-is.
Sourcepub const TRANSACTION_CURRENCY: &str = "transactionCurrency"
pub const TRANSACTION_CURRENCY: &str = "transactionCurrency"
The currency that the user would prefer the transaction to use, in ISO 4217 currency code.
This hint will be translated to the below values on different platforms:
- web: “transaction-currency”.
- Otherwise, the hint string will be used as-is.
Sourcepub const USERNAME: &str = "username"
pub const USERNAME: &str = "username"
The input field expects a username or an account name.
This hint will be translated to the below values on different platforms:
- Android: AUTOFILL_HINT_USERNAME.
- iOS: username.
- web: “username”.
- Otherwise, the hint string will be used as-is.