Loading

How to Limit the Number of Characters Allowed on a Salesforce Standard Field

Date de publication: Jul 17, 2026
Description

In Salesforce, standard fields have fixed character limits that cannot be changed directly. For example, the Account Name field on the Account object allows up to 255 characters by default. If you need to restrict this to a lower limit — such as 80 characters — you can use a Validation Rule as a workaround. This approach applies to any standard field.

Résolution

The character limit on Salesforce standard fields cannot be changed directly. However, you can use a Validation Rule to enforce a lower character limit. The example below restricts Account Name to 80 characters, but the same approach applies to any standard field — only the field name and character count in the formula will differ.

Workaround: Use a Validation Rule to Restrict Character Limit ### Salesforce Classic

  1. Click Setup | Build | Customize | Accounts | Validation Rules.
  2. Click New and enter a Rule Name and Description.
  3. Enter the Condition formula: LEN(Name) > 80`

Enter the Error Message: Account name should not exceed 80 characters. Click Save.

Lightning Experience 

  1. Click Setup | Object Manager | Accounts | Validation Rules.
  2. Click New and enter a Rule Name and Description.
  3. Enter the Condition formula: `LEN(Name) > 80`
  4. Enter the Error Message: Account name should not exceed 80 characters.
  5. Click Save.

Note: To apply this workaround to any other standard field, use the same Validation Rule approach with the following formula pattern — replacing the field name and character count as needed:

LEN(FieldName) > number_of_characters_to_restrict

For example, to restrict the Description field to 500 characters: `LEN(Description) > 500`

Numéro d’article de la base de connaissances

000388274

 
Chargement
Salesforce Help | Article