web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Username validation (j...
Power Pages
Answered

Username validation (javacript | reg expression)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I got a requirement to validate the default username field on a custom form.

 

With the requirement

 

- at least 8 characters

Following characters are possible:

- Upper and lowercase

- digits

- special characters +-@._

 

Could anyone assist me with the creation of the javascript?

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,398 Most Valuable Professional on at

    Do you need this to be done via JS? is this the username on the Register page or a Basic Form/Advanced Form?

    Basic/Advanced form gives you the ability of adding a REGEX validation via Metadata: Configure basic form metadata for portals - Power Apps | Microsoft Docs

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes thank you! I did mange to add the regex via entity form meta data!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 45

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 14 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 13

Last 30 days Overall leaderboard