Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7576751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:59:49+00:00 2026-05-30T16:59:49+00:00

Can you help me write two rules that check phoneNumber? First rule: start with

  • 0

Can you help me write two rules that check phoneNumber?
First rule: start with +7 or 8 then any ten numbers.
Examples:

+77017223457 - valid
77017223457 -not valid
87017223457 - valid

Second rule: start with +7 or 8 then three numbers from set:
{700, 701, 702, 705, 707, 712, 713, 717, 718,721, 725, 726, 727, 777 } then any seven numbers.

Examples:

+77074446255 - valid
+77034446255 - not valid (no 703 in the set)

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:59:50+00:00Added an answer on May 30, 2026 at 4:59 pm
    var phone = $("#phoneNumber").val()
    var regex = /^((\+7)|8)(700|701|702|705|707|712|713|717|718,721|725|726|727|777)[0-9]{7}$/;
    if(regex.test(phone))
       // Phone is valid
    else
       // Phone is invalid
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a c# library that can help to write and indent Javascript code.
can someone help me to write RegExp to remove all characters except numbers and
can anyone help me write a linq query, its a bit confusing... Basically i
java experts can you please help me write detached queries as a part of
I hope somebody can help me. I've been trying to write a custom html
Can anyone help me with the trying to write SQL (MS SqlServer) - I
Maybe you can help me... I am writing a program in Windows Mobile that
I need help I'm using EJS javasript template to write a code snippet two
I have to write in a PyCUDA function that gets two matrices Nx3 and
I hope someone can help me. I have a website that uses javascript to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.