Skip to content

Instantly share code, notes, and snippets.

@vgrem
Created November 6, 2012 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgrem/4023740 to your computer and use it in GitHub Desktop.
Save vgrem/4023740 to your computer and use it in GitHub Desktop.
SharePoint People Editor Validator with jQuery Validation plugin
//People Editor Validator with jQuery Validation plugin
function validatePeopleEditor(peId,messageText)
{
var $pe = $("#" + peId);
var $peValHolder = $pe.find("input[id$='hiddenSpanData']");
$peValHolder.rules("add", {
required: true,
messages: {
required: messageText
}
});
}
@ronakce
Copy link

ronakce commented Apr 10, 2015

Thanks for sharing, can you please show example of how to use this within Jquery validation plugin ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment