validity checking and markdown option