-
Why would you verify that it's less than 8 characters? What if the country code is included? What if there are symbols? You're going to be rejecting a lot of valid numbers!!
And more importantly, if nothing at all is submitted (or just a single digit) it will pass because it's less than 8.
If you want VERY basic checks here, then do something like strlen($y)>3. Certainly a real phone number will be 3+ characters long. And one very easy thing to check is that they didn't entirely skip the field.
-
That is it... got it....Thanks.