Form Validation Archives -

Tag Archives: Form Validation

Form Validation in Power Apps — Part 1

In this blog, we are going to see how we can do the implementation of form validation in Power Apps. Let get started, I have designed the Sign-Up page which has the following fields: Email Password and Confirm Password Phone Number Following is Screenshot of my Sign-Up Page build in PowerApps: Following is App Controls Structure which I have followed to Create Sign Up Form: I have used “ErrorText” which is HTML Label Control for Logging all the Validation Errors. Now, we will set the Properties on ErrorText control to display the error on the Form for Each Input Following is an explanation of each validation which I have used in this Power Apps: Email Validation Not(IsBlank(‘ControlName’)) — It will validate if Field is blank or not. IsMatch(‘ControlName’.Text , Match.Email) — It will validate the email format and return false if user enter invalid Email Address Code: Password and Confirm Password Validation Not(IsBlank(‘ControlName’)) — It will validate if Field is blank or not. ‘Confirm Password’.Text = Password.Text — It will validate if the password and confirm password are the same or not. It will return false if both password will not match. Code: Phone Number Validation Not(IsBlank(‘ControlName’)) — It will validate if Field is blank or not. IsMatch(‘Control’.Text, “Your country Phone Validation ReGex”) — It will validate if the entered phone number is valid or not using ReGex. I have used phone number validation ReGex for India — “^[6–9]\d{9}$” Following is an explanation of my ReGex: 5. Code: Following is full code for Validation you need to paste in Formula bar of HtmlText Property: Result: Blank Field Validation for each Fields — Email, Password, Confirm Password and Phone Number Email Format Validation Now, you can see after entering valid email error has gone Password and Confirm Password Match Validation Phone Number Format Validation Check After adding valid phone number error is gone Hope this helps, stay tuned for more blogs.

Form Validation in Power Apps — Part 2

In this blog, we will implement the following validation on our Sign Up Form in PowerApps: Disable Sign Up button if any invalid input is present in Form. Change Border or Fill Color Input which is invalid. Before moving forward please check out my previous blog because this blog is a continuation of my previous blog. Click Here Disable Sign Up button if any invalid input is present in Form Select the Sign-Up button in the form. 2. Select the property DisplayMode so that we can change Display Mode to disable if any invalid input is entered on Form 3. Add the following to in DisplayMode Formula Bar If(ErrorText.HtmlText = “”,Edit,Disabled) It means that when Error Text is empty it will enable the submit button or else it will disable it. Change Border or Fill Color Input which is invalid. Now we will add function in Fill and border to input if that input is Invalid. Email Input Select the Email Input and choice BorderColor Property. 2. Now, In BorderColor we will add the following code in the formula bar, so if Email Input is invalid or not in the format it will change the border color of input to red or you can add whatever color you want. 3. Code : 4. You can see in the following screenshot when an email is invalid or empty then the input border is red. Password and Confirm Password Input Password and Confirm Password Input 2. Now, In BorderColor we will add the following code in the formula bar, so if Password value doesn’t match with Confirm Password Input it will change the border color of input to red. 3. Code: 4. You can see in the following screenshot when password / confirm password does not match or empty then the input border is red 5. For Confirm password Field you can follow the same step as Password Field Phone Number Input Select the Phone Number Input and choice BorderColor Property 2. Now, In BorderColor we will add the following code in the formula bar, so if Phone Number Input is invalid or not in the format it will change the border color of input to red. 3. Code: 4. You can see in the following screenshot when phone no is invalid or empty then the input border is red. Here we finish with our blog, I hope this helps a lot and stay tuned for more blog like this. Thank you

SEARCH :

FOLLOW CLOUDFRONTS BLOG :

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :