I have two required columns in a custom list. When adding an item using OOTB new form, the required field validator shows same error message

You can't leave this blank.

For both required columns. Does anybody know what is the best way to show different messages for each of them?

2 Answers 2


Instead of Required Field. Just add a validation based on following formula.


Now use Validation Error Message for custom message.


You can use Strings.STS to override message. Just add this code to your page or master page if you want to apply all your site.

<script type="text/javascript">
        $(document).ready(function () {
            try {
                if (Strings.STS.L_SPClientRequiredValidatorError != null) {
                    Strings.STS.L_SPClientRequiredValidatorError = "What ever you want!";
            catch (exception) { }

For more information:

SharePoint 2010 use message:

"You must specify a value for this required field." It showed after validating from the server.

SharePoint 2013 shows a message:

"You can't leave this blank."

after validating from the client. But, if you use SharePoint webpart and SharePoint control, it still shows a message same as SharePoint 2010. It makes it inconsistent from your site.

  • OP wants to show different messages for each of the fields, not change it everywhere Jun 1, 2017 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.