Hi @Ankur Bawiskar ,
it is not working and client wanted the error message in the Portal,
When we added greater than 3mb attachment, need to show error message in the portal and stop the form submission 
Thanks in advance for you response, have a nice day