Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

New Item field validation

$
0
0
Trying to validate if a "Tool" field in a sharepoint new item form equals one of 2 strings when user causes blur event. If it is either "abc" or "zzz", then I need to popup and alert. Not sure what I'm missing here:

<script type="text/javascript"> 
$(document).ready(function() { 
 $( "#Tool" ).blur(){

if($("#Tool").val() == "abc" || "zzz") {
   alert('Warning...');
}
}

}); 
</script> 

Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>