A minimum of 2 years from the discharge date on a Chapter 7 and for a Chapter 13 verification for a minimum of a 12 month period that all court ordered payments have been made on time. For Ch 13 you would also need a letter from the courts trustee allowing you to proceed with a mortgage in order to even start with your mortgage application.
In both cases you must have reestablished credit, have a solid work history and provide an explanation for the bankrupcy.
Just as a warning, if you have even one late since the bankrupcy, most underwriters will not approve you loan.
I hope this answers your question.