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

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
Highlighted
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
Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,596)