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 Apps / Easy question: How do ...
Power Apps
Answered

Easy question: How do i validate register page in power apps?

(0) ShareShare
ReportReport
Posted on by 403

This question might have answered a couple of times but for  my scenario, it's little confusing.
I don't have a form page

I just have a Username text input and Password Text Input and a Register Button

SO when user clicks register button, these things should happen..

  1. if the username and password is empty then it should say, username and password cannot be empty, please enter username and password
  2. and username should be atleast 3 characters and password should be minimum 5 characters but it can be any character, doesn't matter if it should have lower case or upper case but the main goal is it should have only 5 characters
  3. if the second point satisfies, then it should say, password is valid in green color of the password text input , similarly for username as well
  4. finally , whatever username and password , user enters, it should be saved in a sharepoint list when he clicks register button. and finally it should notify , your account has been registered. Login now!!

so what's the solution for this?

Categories:
  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @Jupyter123 ,

    I am a little confused why you would ask a user to re-register when they have already signed in with their Office365 user name and password and you know who they are and are valid. If you simply want to register them for something, you do not need further authentication.

  • Jupyter123 Profile Picture
    403 on at

    @WarrenBelz , In my application, the users cannot use their office365 mail to register or sign in .
    So i want them to register once before they proceed to login, and i will be using Sharepoint list to store the user's details in backend.
    So in my case, what would be the solution ?

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @Jupyter123 ,

    If they cannot use their Office365 accreditation, they cannot use Power Apps.

  • Jupyter123 Profile Picture
    403 on at

    @WarrenBelz My goal is to upload this application in teams channel and whenever they use this application in teams, they should register and use it.

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    @Jupyter123 ,

    So they have already used their credentials to log into Teams - you can capture User().FullName from this and register them - the point I am making is that you do not need a password - in fact it is dangerous as they will probably use their O365 password which is now in plain sight in SharePoint.

  • Jupyter123 Profile Picture
    403 on at

    @WarrenBelz i designed the app in such a way where they have to register as new user and login.
    and that's my requirement.

    they should not use their office365 email or teams creds.

    they have to register as new user.

    that is my requirement actually 😕

    so i have a username text label and an input box, similarly for password and a register button.

    This is my requirement.

    SO when user clicks register button, these things should happen..

    1. if the username and password is empty then it should say, username and password cannot be empty, please enter username and password
    2. and username should be atleast 3 characters and password should be minimum 5 characters but it can be any character, doesn't matter if it should have lower case or upper case but the main goal is it should have only 5 characters
    3. if the second point satisfies, then it should say, password is valid in green color of the password text input , similarly for username as well
    4. finally , whatever username and password , user enters, it should be saved in a sharepoint list when he clicks register button. and finally it should notify , your account has been registered. Login now!!

    so what's the solution for this?

  • Verified answer
    SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    Hi @Jupyter123 

     

    This is complex, so my advice will be following this tutorial

    https://www.youtube.com/watch?v=BN74SsN4mm8

    and extend it by creating the User

    To create a user-simple Patch outcome of the UserName Field and Password Field

    and to Validate them by Lenght of the password. Use Len() Function, and if the condition match it will Patch data to DataSource.

     

     

     

    If(Len(txt_UserName.Text) < 3 || len(txt_Password.Text) < 5, 
     Notify("UserName or Password to short"),
     Patch("DataSource",
     Defaults("DataSource"),
     {
     UserName:txt_UserName.Text
     Password:txt_Password.Text
     }
    )

     

     

     

    But @WarrenBelz is right. What for all that hassle? Do Your users use company accounts in M365, and then You want to collect and subscribe them to Personal accounts ?

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    @Jupyter123 ,

    I will leave you with @SebS as he seems keen to come in on a discussion in progress.

  • Jupyter123 Profile Picture
    403 on at

    @SebS Even I don't know but that's the requirement given to me.

    But anyway, the above code works, and just one more add up, how do i show a message when the register was succesful, it should display "your account has been registered"  and it should navigate to "Login Page"

  • SebS Profile Picture
    4,882 Super User 2026 Season 2 on at

    @Jupyter123 

     

    I'm running late to work, so can't show You the exact step-by-step but created a variable UpdateContent({varSuccess: true}) add it at end of Patching, then create a popup in Container and in the visible option of that container, place varSuccess and some button to close it or create a delay with varSucess set to false

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard