added validation constraint and implemented file fields