Yeah, that's fine as long as you get all of it out.
I put my brushes in the dishwasher and then wash them like you wash dishes. Then I run the dishwasher once again just to be extra-sanitary... though it's perfectly clean, the dishwasher takes care of everything.