CSP: Fixed #4. Validate source expressions in validate.

I forgot to validate source expression in ``validate`` in previous commits.
I have also re-written the tests for testing ``validate``.