How to validiating mobile number in csv file?

Same thing - your validation function would just check that the numbers start correctly and return true or false, and your main loop would look at the return from the function to decide whether to insert them into the database or not.