fixes #4654 Required field validation needed for file asset

Fixed the issue and committed the code for review, tested in all DBs (H2DB, Postgres,MySQL,MSSQL, and Oracle).
Please check it.