Ashok Kumar

Ashok Kumar

  • 1.8k
  • 42
  • 196

validation Upload file in multiline text box

Jul 2 2019 10:04 PM
In list I have a column name Comments multiline text box Enhanced rich text (Rich text with pictures, tables, and hyperlinks) which is append changes to existing text, I want to validate that user must upload file in comment box before saving else it will not allow to save the item.
Tried using below code for blank value its working , but how to do for upload
 
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
function PreSaveAction(){
if($(".ms-rtestate-write[id^='Comments']")[0].innerHTML=="<p>​</p>"){
alert('Please fill out Column B');
return false;
}
return true;
}
</script>