Writing validation code.
Show error when we get an error fromt he validator.