Validate Column is either NULL or has 11 characters
The SharePoint List has a Single Line of Text Column.
In this column any combination of letters and numbers can be entered.
I need these two validations to run:
1] The field can be NULL / BLANK / Can be left blank
OR
2] IF the field has a data entry, it must be 11 characters. Not less than 11, not more than 11.
Require that this column contains information is not checked in all cases.
Another way to summarize:
Allow either zero characters or 11 characters, else show the validation.
nothing I have tried works.
=LEN([MEMBERMBI])=11
Even if the field is not set to require entry, with this validation, the field requires entry. Cannot be NULL.
=IF(OR(LEN(MEMBERMBI)=0),(LEN(MEMBERMBI)=11))
With this validation, the field requires entry. Cannot be NULL.
=IF(NOT(ISBLANK(MEMBERMBI))),AND(LEN(MEMBERMBI)=11)
SharePoint removes the code on Save, does not like this code.
Is there a way to allow either a NULL entry OR if there is an entry, validate on LEN=11?
Acorn999 Try using this validation formula:
=OR(ISBLANK(MEMBERMBI),LEN(MEMBERMBI)=11)
Note: Sometimes comma(,) does not work in formula (it is based on language or regional settings on your site). So in that case use semicolon(;) instead of comma(,)
Similar thread: Error in Formula in List Validation Settings
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.