- 3.3.5 Business Rules and Validations
- File Size Limit
- Rule: Uploaded files must be less than 10 MB.
- Validation: The system checks the file size before allowing the upload.
- Error Handling: Display an error message if the file exceeds the size limit.
- Allowed File Types
- Rule: Only specific file types are permitted, such as text files (.txt) and PDF files (.pdf).
- Validation: The system verifies the MIME type of the uploaded file.
- Error Handling: Reject unsupported file types with an appropriate error message.
- File Integrity
- Rule: Files must be valid and free from corruption.
- Validation: Perform MIME type checks to ensure the file is not malicious.
- Error Handling: Reject invalid files and notify the user.
- Double Extensions Prevention
- Rule: Files with double extensions (e.g., document.pdf.exe) are not allowed to prevent security risks.
- Validation: Scan file names for multiple extensions.
- Error Handling: Reject such files with an error message.
- Mandatory Fields
- Rule: All fields (Document Upload) are required.
- Validation: Ensure that users cannot proceed with uploading a document unless all required fields are filled.
- Error Handling: Display error messages for any missing fields.
- File Size Limit
Business Rules and Validations
Updated on August 26, 2025
devdocs