mimetype validation and some operation validation