I need to check whether the documents uploaded by the user is not exceeded 10 MB. Apart from using document function which requires the document ID how this can be implemented
Discussion posts and replies are publicly visible
How to check and disable the file upload if size limit exceeded
What do you mean with "disable". If you follow the code example I shared, the field validation triggers and the form cannot be submitted.
If this is not what you need, please describe in more detail.
Although the validation is coming up but still document can be submitted further only the user can remove it after following the validation
A form with a failed validation cannot be submitted! That's the whole point of validation. Please explain in more detail.
Or, do you mean that a failed document stays within the component? Yes, this is how it works.