How to Validate DUM-000000 or MDM-000000 Format in SharePoint Columns
Question details
The user needs a SharePoint column validation formula to strictly enforce a specific text format: either 'DUM-' or 'MDM-' followed by exactly six digits.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Configuring custom column validation rules in a SharePoint list or library to maintain data consistency.
- Observed behavior
- A requirement to strictly validate text strings based on a specific prefix, hyphen placement, total length, and numeric suffix.
Ensure you have Full Control or Design permissions on the SharePoint list to modify column settings and apply validation formulas.
Apply Native SharePoint Column Validation Formula
Use a combination of logical and text functions to validate the exact string format directly in the SharePoint list settings.
SharePoint allows you to enforce strict data entry rules using Excel-like formulas. The formula checks if the first three characters match the required prefixes, ensures the total length is exactly 10 characters, verifies the hyphen is at the 4th position, and confirms the last 6 characters are numbers.
Open your SharePoint list, click the Gear icon in the top right corner, and select 'List settings'.
Scroll down to the Columns section and click on the column you want to validate (e.g., LocalAssetRef).
Expand the 'Column Validation' section and paste the following formula: =AND(OR(LEFT([LocalAssetRef],3)="MDM",LEFT([LocalAssetRef],3)="DUM"),LEN([LocalAssetRef])=10,MID([LocalAssetRef],4,1)="-",ISNUMBER(VALUE(MID([LocalAssetRef],5,6))))
Add a user message to explain the requirement if validation fails, then click 'OK' to save your changes.

Use Power Apps IsMatch for Customized Forms
Since SharePoint column validation may not carry over to Power Apps forms, use the IsMatch function with a regular expression when customizing the list form.
Manage Complex Data Efficiently with WPS Office
While SharePoint handles list-based data, preparing and validating large datasets before uploading is much easier with a robust spreadsheet tool. WPS Office provides a lightweight, highly compatible alternative to Microsoft Office, complete with powerful data validation features.
- 1. Download WPS Office: Visit the official WPS website to download the free installation package for your operating system.
- 2. Open WPS Spreadsheet: Launch WPS Office and open a new Spreadsheet to begin managing your dataset.
- 3. Use Data Validation: Highlight your data column, navigate to the 'Data' tab, and click 'Data Validation' to enforce custom formula rules similar to SharePoint.

Frequently Asked Questions
Why is my SharePoint validation formula returning a syntax error?
Syntax errors usually occur if column names are misspelled, not properly wrapped in brackets (e.g., [Column Name]), or if your regional SharePoint settings require semicolons instead of commas to separate formula arguments.
Does SharePoint list validation apply automatically to Power Apps?
No, SharePoint list column validation rules generally do not carry over to customized Power Apps forms. You must configure validation separately within Power Apps using the IsMatch function.
Can I validate multiple formats in one SharePoint column?
Yes. By wrapping multiple logical checks inside an OR function within your validation formula, you can configure a column to accept various distinct formats, such as allowing both 'DUM-' and 'MDM-' prefixes simultaneously.




