This project has moved. For the latest updates, please go here.

SPRequireUnique not working

Feb 6, 2014 at 2:26 PM
Edited Feb 6, 2014 at 2:35 PM

I'm new to SPS functions and trying to learn all I can.

I'm in the need to use the SPRequireUnique function. Yet, for some reason that I'm not aware; this function is not working.

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script language="javascript" src="//" type="text/javascript"></script>
<script language="javascript" src="//" type="text/javascript">
</script><script language="javascript" type="text/javascript">
    $(document).ready(function() {
            columnStaticName: "Order",
            duplicateAction: 0,
            ignoreCase: "true",
            initMsg: "This value must be unique.",
            initMsgCSSClass: "ms-vb",
            errMsg: "This value is not unique.",
            errMsgCSSClass: "ms-formvalidation"
Any advise, perhaps something I'm missing?
Feb 6, 2014 at 3:36 PM
Edited Feb 6, 2014 at 3:37 PM
It looks like the function is setting up properly, since you're seeing the initMsg.

It looks like this is the EditForm? If it is, was the value for Order added on the NewForm? Are there other items with "q123456"?

The function checks for uniqueness on blur from the input element.

Feb 6, 2014 at 4:29 PM
Hi Marc,

Thanks for the fast reply.

It's the NewForm and there are other items with "q123456". The EditForm do not have this code.

I'm using this function with a list created under wiki library.