Validation For Repetitive input fields

I have long form which have a lot of validation. But some of validation are repetitive.

E.g office 1 phone no, office 2 phone no, office 3 phone no, etc

So I need to check all of phone no input fields. Error Message want to show below input field.

E.g if office phone 1 is incorrect, it needs to show error message below the input field of office 1 phone no.

Therefore I have bulk amount of repetitive checking at my code.

Please help me how should I do for above condition.

I don't know any better way to implement server side form validations, but I'm very interested to see if anyone has a better suggestion.

Hello João

I would like to know other form of do it.

Best Regards