Use optional instead of dontValidate
Make session available in check transform step, close #2134