First off, thank you for not shoving AI into Adaxes and for continuing to improve it.

I'm trying to set property pattern validation for new user creation and I'm a little stuck. Specifically, I want to make sure that the data entered:

  1. doesn't start with a space
  2. doesn't end with a space
  3. doesn't contain a 'smart' quote (‘ ’ “ ”)
  4. no double (or more) spaces

I did see I could impose the "must not start/end with" but that doesn't solve #3 and #4

Regex looks good but maybe I'm not quoting it properly? This does work for #1 and #2 but doesn't work for #3 unless there's two 'smart' quotes next to each other ^[^\s][^\‘\’\“\”]+[^\s]$ image.png image.png

I had tried this which didn't work for #3 either because it seems to see it as this string "‘’“”", regex101.com reckons it needs to be escaped like above. ^[^\s][^‘’“”]+[^\s]$

I haven't been able to figure out #4 multiple spaces cause adding \s{2,} doesn't work.

I could use Powershell validation but I'd prefer to have it on the form itself as then when the user is entering the data it tells them why it's an issue.

Am I just testing against the wrong flavor of regex? It does look like \‘\’\“\” would be incorrect for .NET because it doesn't need the backslashes but I tested with that and had the same issue of needing at least two 'smart' quotes to trigger the error message.

Any assistance is much appreciated

ago by (20 points)

1 Answer

ago by (308k points)
0 votes

Hello,

Do we understand correctly that you need to actually allow only English letters and numbers? If that is correct, you can use the following regexp:

^[a-zA-Z0-9 ]$

Related questions

I am trying to use a property pattern to prevent email forwarding to accounts in other domains managed by Adaxes. Here is my regex: ^([^,]+,)+(DC=domain,DC=local) ... 't working? Is Adaxes using some other value before resolving the DN? Thanks in advance! Leah

asked May 9, 2019 by loliver (120 points)
0 votes
1 answer

In this case the working example would be that the user would need to add a new title into a list of titles in the title property pattern

asked Dec 13, 2024 by msheppard (880 points)
0 votes
1 answer

The use case we are looking for is providing a list of titles for users to choose from when initiating a re-hire. We already have a title property pattern established and would ... that we can manage the list in one place. Let me know and as always, thanks.

asked Nov 22, 2024 by msheppard (880 points)
0 votes
1 answer

Is there a way I can bypass a property pattern for a set of users? For example we have an AP team that creates an account and want to restrict Job Title and Department to a ... we would like to be able to override that list. Is there an easy way to do that?

asked Sep 5, 2024 by curtisa (350 points)
0 votes
1 answer

I have a specific computer property pattern for three different types of computers, which live in three different OUs and are in three different business units. I will have ... How do I enforce a property pattern for a specific business unit at creation time?

asked Jul 17, 2023 by bennett.blodinger (60 points)
0 votes
1 answer