Using a nested for loop, perform data validation to check that every number in the matrix is an integer.
a. Utilize rem() or mod() functions for validation.
b. Implement try-catch blocks for error handling.
c. Iterate through the matrix and use the isInteger() function.
d. Apply regular expressions for integer detection.