P5-data-formvalidator

Jul 20, 2023

Validates user input (usually from an HTML form) based

DataFormValidator’s main aim is to make the tedious coding of input validation expressible in a simple format and to let the programmer focus on more interesting tasks.

When you are coding a web application one of the most tedious though crucial tasks is to validate user’s input usually submitted by way of an HTML form. You have to check that each required fields is present and that some fields have valid data. Does the phone input looks like a phone number? Is that a plausible email address? Is the YY state valid? etc. For a simple form, this is not really a problem but as forms get more complex and you code more of them this task becames really boring and tedious.

DataFormValidator lets you define profiles which declare the required fields and their format. When you are ready to validate the user’s input, you tell DataFormValidator the profile to apply to the user data and you get the valid fields, the name of the fields which are missing. An array is returned listing which fields are valid, missing, invalid and unknown in this profile.

Seamus Venasse svenasse@polaris.ca



Checkout these related ports:
  • Zxing-cpp - ZXing C++ Library for QR code recognition
  • Zu-hunspell - Zulu hunspell dictionaries
  • Zu-aspell - Aspell Zulu dictionary
  • Zq - Easier and faster alternative to jq
  • Zorba - General purpose C++ XQuery processor
  • Zenxml - Simple C++ XML Processing
  • Zed - Command-line tool to manage and query Zed data lakes
  • Yq - Command-line YAML and XML processor, jq wrapper for YAML/XML documents
  • Yould - Pronounceable word generator
  • Yodl - Easy to use but powerful document formatting/preparation language
  • Yi-hunspell - Yiddish hunspell dictionaries
  • Yi-aspell - Aspell Yiddish dictionary
  • Yelp-xsl - DocBook XSLT stylesheets for yelp
  • Yelp-tools - Utilities to help manage documentation for Yelp and the web
  • Ydiff - Diff readability enhancer for color terminals