Giter Club home page Giter Club logo

input-validation-and-data-sanitization-project's Introduction

Input Validation and Data Sanitization Project

Table of Contents

Introduction

The objective of this project is to use regular expressions to check and remove unwanted input ensuring that data conforms to security-related requirements.

Get Started

Here are some steps to get started:

  1. Download or copy the Code.py file
  2. Create a text or csv file anywhere on your pc and name it
  3. In the file open() function (Line 4) provide the location of that text file you've created in step 1
  4. Paste in samples (you can use the sample inputs provided here)
  5. Run the code!

Inputs Requirements

Here are all the valid input requirements:

  1. Student: 9 digits. acceptable formats: 000000000, 000 000 000
  2. Password: a-z, A-Z, 0-9, ascii printable special characters, minimum 12 characters
  3. Username: a-z, A-Z, 0-9, minimum 3 characters, maximum 20 characters
  4. Email: [email protected], username, domain and TLD will conform to the rules above for a “username” field. There will only be one TLD (i.e. no multiples like domain.co.uk)
  5. Previous: Confirm that this data field is identical to the previous line’s data field (excluding whitespace)
  6. Phone: A North American phone number. Possible formats: 1234567890, 123.456.7890, 123-456-7890, (123) 456-7890
  7. Postal: A Canadian postal code. Possible formats: A0A0A0, A0A 0A0
  8. Address: A string field containing a-z, A-Z, 0-9, periods and dashes.
  9. Binary: A single binary string, must contain only 1s and 0s with no breaks between digits
  10. Biography: A generic string field. Report “no” only if the field contains any html tags.

Example Inputs

Here are some example inputs:

student,999999999

password,abcd1234

username,user123

email,[email protected]

previous,[email protected]

phone,123-456-7890

postal,M86 72Z

address,123 street blvd.

binary,11110000

bio, hello world

student,9999 9999

student, 111111111

password,123456abcdef!!

username,stevedave

previous,stevedave

phone,((416-111-1234

postal,H1R3T7

bio,Hello<script>World</script>

Example Outputs

The output will be a simple “yes” or “no” string. Here is what the example output would look like (based on the provided input in the above section):

yes

no

yes

yes

no

yes

no

yes

yes

yes

no

yes

yes

yes

yes

no

yes

no

References

Reference Link

input-validation-and-data-sanitization-project's People

Contributors

jacyuan1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.