added error messages for security on edit post