Validating name

Posted by / 09-Nov-2017 09:04

This is a light weight module which helps site admin to restrict the term names with blacklisted characters/words, character length, word count and unique name.You can also add additional restricts new terms creation through term reference, based on settings. There are two ways to declare validation rules for nested objects.The first way is to declare the validation rules with a corresponding nested object structure that reflects the data.So, as a public service, I’m going to list assumptions your systems probably make about names. Try to make less of them next time you write a system which touches names. If you need examples of real names which disprove any of the above commonly held misconceptions, I will happily introduce you to several.Feel free to add other misconceptions in the comments, and refer people to this post the next time they suggest a genius idea like a database table with a first_name and last_name column.

Isn't using \w is equivalent to [A-Za-z0-9_], which would not consider discriticals You can use something like (\w\s*) Ideally - and ' should not be part of the name. Some people might have it in the name) i want to use this experssion - ^[\p \.'\-] $ I think it does what I want, but its not working in python - if re.search(r"^[\p \.'\-] $", name): return True return False always returns true for some reason! Though you have a general idea of how a name should be formated there are no fixed rules, and you don't want to tell a user that their name is not valid in most cases.

The second way is to declare validation rules with flattened key names. The field under validation must be yes, on, 1 or true.

This is useful for validating "Terms of Service" acceptance.

See:https://drupal.org/documentation/install/modules-themes/modules-7 for further information. CONFIGURATION * Configure user permissions in Administration » People » Permissions: Term Name validation admin control.

* Configure Term Name Validation in Modules » Configure admin/config/taxonomy/term-name-validation.

validating name-75validating name-28validating name-78

That definition wouldn't include the Artist Formerly Known as Prince.