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

Community site session details

Session Id : wRcgLH6RzbDIiKAGIos1a/
Power Apps - Building Power Apps
Answered

Validation for Special Characters

Like (1) ShareShare
ReportReport
Posted on 22 Jul 2020 09:19:14 by

Hello,

 

I am working on an PowerApp where there are few fields in which i want a validation that, if a person enters special characters then the form should not get submitted and to show a warning message. For warning message i can use notify function but how to check and act if a field value consisting of special characters? 

 

Regards,

Akshay

Categories:
I have the same question (0)
  • PrudhviL Profile Picture
    136 on 10 Jun 2023 at 14:58:07
    Re: Validation for Special Characters

    HI @Varinder__Singh 
    I found a solution, 
    Just try removing &Char(34)& from the formula. 
    It worked for me.

  • Varinder__Singh Profile Picture
    2 on 09 Jun 2023 at 08:07:35
    Re: Validation for Special Characters

    I am getting the same issue, any resolution?

     

  • PrudhviL Profile Picture
    136 on 09 Jun 2023 at 03:03:56
    Re: Validation for Special Characters

    Hello I have tried this work around and it was working until yesterday. Since then it is showing an error message. I have also built it from scratch and tested it. Still it's not working. Could you please let me know why is this happening or is there any work around for it?


    Thanks

     

    PrudhviL_1-1686279888250.pngPrudhviL_2-1686279916266.png

     

  • JAWL Profile Picture
    393 on 11 Mar 2022 at 02:52:10
    Re: Validation for Special Characters

    Hi @jlindstrom 

    Unfortunately, your formula cannot flag ` [ ] as invalid characters? How can I modify it?

     
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on 24 Feb 2022 at 18:30:46
    Re: Validation for Special Characters

    In reference to @RMD211 's question.   I had him try this:  IsMatch(Self.Text,".*[^a-zA-Z0-9_].*" ), which works well for me on all Special Characters, but he is having difficulty with it.    It only works on certain special characters.   He is in the UK and his language in the app is en-gb.

  • RM-30040732-0 Profile Picture
    468 on 24 Feb 2022 at 13:30:41
    Re: Validation for Special Characters

    Hello! Do you have any idea how to set your Ismatch to find all special characters (without specifying each one)? And how to find spaces?  I'm trying to validate entries that only contain letters or numbers and can't get Ismatch to work!

  • Dado90 Profile Picture
    2 on 20 Jul 2021 at 12:49:27
    Re: Validation for Special Characters

    Works really well for me. 

    With this onchange-code i can block the special characters Char(34) and Char(47).

     

    Now my new problem is, as soon as someone set a new line in de multiline datacardvalue-field by clicking the enter-button, the code is like not activ anymore. 

     

    does anybody knows how the ismatch is working when enter-button for a new line is clicked in an multiline datacardvalue-field?

     

    Thanks

  • AkshayManke Profile Picture
    on 31 May 2021 at 17:16:49
    Re: Validation for Special Characters

    Hi @GixStar ,

     

    I think you can just add parenthesis in the two conditions like below.

    If(
    !(Label4.Visible) Or !(Label6.Visible),
    Edit,
    Disabled

    )

     

    I have created a test on my env. you can refer the below GIF for the same.

     

    Condition.gif

  • GixStar Profile Picture
    6 on 27 May 2021 at 17:55:47
    Re: Validation for Special Characters

    Hi 

    i tried that but its still only disabling the Submit button if Label4 and Label6 has invalid characters, if one of them have invalid Characters Submit button is still active.

    Thank you 

     

    If(
    !Label4.Visible Or !Label6.Visible,
    Edit,
    Disabled

    )

  • jrtraylor Profile Picture
    45 on 25 May 2021 at 19:59:19
    Re: Validation for Special Characters

    @v-qiaqi-msft 

    How can i modify your formula to allow for 4 characters? I need to allow Char(38), Char(45), Char(46) and Char(95) in my text box.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 892 Most Valuable Professional

#2
Power Apps 1919 Profile Picture

Power Apps 1919 356

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 310 Super User 2025 Season 2

Last 30 days Overall leaderboard