Based on the positive feedback we've received from our customers, the Prevoty engineering team has added seven new typed input validations:
- Credit Card numbers
- IPv6 addresses (in addition to the previously released IPv4 validation)
- MAC addresses
- UUID (MAC address + DCE Security)
- UUID Version 3 (MD5 hash)
- UUID Version 4 (random)
- UUID Version 5 (SHA-1 hash)
For UUIDs, we support the versions described in the RFC4122 specification.
As a demonstration of how you could implement a typed validation into your existing application, I've put together a small Java servlet (registered on
/validation) that showcases a minimal request/response lifecycle:
From the snippet above, we instantiate a Prevoty client in our servlet constructor with a valid API key and other parameters. Our
GETrequest generates a web form with an input to enter a credit card number while the validation work happens in the
doPostmethod, which is fired during a
POSTrequest. Performing the validation is simple:
result = client.ValidateCreditCard(creditCardNumber);- this returns an InputValidationResult which contains a boolean indicating a match as well as other metadata. As you can see, it doesn't take much to start adding typed input validations to your web applications.
Prevoty first launched support for input validation of specific types back in July. If you'd like to see us support other kinds of validations, please let us know at firstname.lastname@example.org. As always, you can contact us if you'd like to get started with an evaluation of Prevoty today.