Multi-line text field is not available in column picker of Validation Settings page since it is not supported in formula expressions. But you could consider the following client-side approach.
How to validate Multi-line text field in SharePoint
Probably one of the best ways to apply client-side validation in SharePoint 2010 and 2013 would be to override PreSaveAction
handler.
PreSaveAction
function is a user defined function that allows to
override standard behavior for a Save button handler in List Forms on the client-side.
Let's say we need to validate Notes
field in Links
list to accept only letters, then the following steps demonstrate how to apply those changes:
Steps:
- Open New Form page in Edit mode
- Add Content Editor web part on the page
- Insert the code provided below into
Content
property of Content Editor web
part
Code:
<script>
function isLetter(val) {
var re = /^[a-zA-Z]+$/;
return re.test(val);
}
function PreSaveAction(){
var commentsBox = findFieldControl('Notes'); //find field control by title
if (!isLetter(commentsBox.val())) {
var errorHtml = '<br/><span class="ms-formvalidation"><span role="alert">Only letters are allowed<br></span></span>';
commentsBox.after(errorHtml);
return false;
}
return true;
}
function findFieldControl(fieldTitle)
{
var control = $('[title="' + fieldTitle + '"]');
return control;
}
</script>
Result

Some additional information about client-side validation in SharePoint 2010/2013 could be found in this post.