Dance of Shiva

Dance of Shiva


'Dance of Shiva' by Karmacosmic is absolutely one of my favourite songs of all time.

I mean... the joy... contained in there... is just magnificent. It's just magnificent!

Introduction to Form Validation

Websites require a lot of information to function - things like our usernames, our passwords, our 'friends/followers/connections', 'likes', credit card information, and so on.

These all have to be filled out by users on the front-end (or provided). 

User information is traditionally collected using HTML "forms". "If you ever entered text in a website, selected options on a list, or checked a box and then hit enter (/pressed button), YOU LIKELY FILLED OUT AND SUBMITTED AN HTML FORM!!!!". 

Wow.

"The process of checking that the information submitted through a form adheres to expectations is called form validation".

Why Validate Forms?

Most data once submitted into forms is stored by a website or a web app. 
It's stored 'in a database, on the server side'.

There are reasons why it is important for us to make sure that this data is accurate:
  • We want operations that depend on the data to work:
    • E.g. the user's email address needs to be accurate for further communications to go ahead
    • E.g. or the usernames need to be unique or else it will cause errors
  • We want to keep our site secure:
    • "Unprotected data leaves entry points for malicious actors to hurt our application or our users".
      • "Allowing a user to submit a non-secure password means that their account will not be protected.".
      • "Unprotected forms can also allows bits of code to be injected into our servers. This can potentially leave our users' sensitive information exposed.".

Regular Expressions

"Data submitted through forms are stored as strings".

Then it talks about using regular expressions or regex or regexp - eek this is all sooo scary - WHYYYYY! 

Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing