changed validation constructor

as discussed, changed the order in the constructor to keep the cause of the error first