Addeded functional tests for editing posts.
Added model code to check if the user input is good or not.