A package for validating name and surname
Project description
<<<<<<< HEAD NF Validator A simple and easy to use package for validating names and surnames written in Unicode.
Installation
You can install the nf_validator package using pip. To do so, open a terminal and run:
pip install nf_validator
Usage
Here is an example of how to use the nf_validating function from the nf_validator package:
import nf_validator
name = "Jürgen Müller"
valid_name = nf_validator.nf_validating(name)
if valid_name:
print("Name is valid:", valid_name)
else:
print("Name is not valid")
In this example, the nf_validating function takes a string as an argument, splits it into a list of words, and then joins the words back into a single string. The resulting string is then normalized using the NFKD normalization form and encoded into ASCII, while ignoring any invalid characters. The final step is to check if the resulting string consists only of alphabetic characters. If so, the name is considered valid and the original, non-normalized string is returned. If not, the function returns False.
Contributing If you would like to contribute to this package, please feel free to submit a pull request. All contributions are welcome!
License This project is licensed under the MIT License. See the LICENSE file for details.
NF_validating
A simple Name Validation package, you can easily verify the validity of names in just a few lines of code
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nf-validator-1.1.0.tar.gz
.
File metadata
- Download URL: nf-validator-1.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4924194b06be3fdff51d0694ea4eb115aa45d30d583eebb164762b9f4dca093 |
|
MD5 | bab2dfe0fcfc30aaa729fc96035af088 |
|
BLAKE2b-256 | 7d6ce0426609fe5802723ad0e93e04ca7084fb1d3d15fc71a58a318d111fa61a |
File details
Details for the file nf_validator-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: nf_validator-1.1.0-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f2c7b00c455fe6c56eeb3a69f0b46991351904bd39dc08d3e366feaf6796e2 |
|
MD5 | 7afa138a2a2baf9654650d8218d05a31 |
|
BLAKE2b-256 | 0ce6b9554de4758de2f02badd2477b854712658d8c1e4a7a5a2682d2360d8941 |