SharePoint 2019 Form Attachment Validation

Hello,
I need to validate the attachment extension so that the user can only upload a jpg or a png type. I have already tried all the solutions I found here with no luck. I also need to force the user to upload one attachment only (can't leave it blank neither attach more than 1 file).

Thank you!!

Dear @georgeselkassouf,
Here, check this out - Check Attachments Extension