cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

New form validation

Hi All,

 

I am currently in the process to build a request form for my organization and i want to plug in some validations in the form. My data source is SharePoint Custom List. Below are my requirements:

  • Length validation for a text field : Restrict user to enter more than 15-20 characters in the text field. if they enter more than that I want the a display message stating enter maximum 15 characters and the save button should get disabled.
  • Date validation : if the user enters the date manually and not by selecting the date picker and if the date entered is wrong then it should also state a display message saying date entered is wrong and the save button should get disabled.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @Jayant2 ,

Character Validation - on the OnChange of the Text box

If(
    Len(Self.Text)>15,
    Notify("Only 15 Characters allowed",NotificationType.Error)
)

On the DisplayMode of the button

If(
   Len(YourTextBoxName.Text)>15,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

For the second one, set the IsEditable of the Date Picker to false.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

1 REPLY 1
Super User III
Super User III

Hi @Jayant2 ,

Character Validation - on the OnChange of the Text box

If(
    Len(Self.Text)>15,
    Notify("Only 15 Characters allowed",NotificationType.Error)
)

On the DisplayMode of the button

If(
   Len(YourTextBoxName.Text)>15,
   DisplayMode.Disabled,
   DisplayMode.Edit
)

For the second one, set the IsEditable of the Date Picker to false.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (9,192)