adds validation && tests for Post class