added rules also for edit and post data