Hmm I think trying to convert such a task into a service will always introduce some language to describe your field and it's constraints and then you might as well write it yourself.
Also with such a critical part of your system, getting information from your user, if the service is slow or down you will run into troubles.
What specific programming languages and/or frameworks do you require a solution for? Please let me know if I missed the point completely. Thanks for your answer!
Well I was imagining some kind of ajax thing that validated fields on the fly as the user filled them in.
Validation is non-trivial for many fields. For example almost no-one implements email validation correctly as per the RFC because it's hard to get right, and most people just use a hacky regex that ends up accepting invalid emails and rejecting valid ones.
Or with credit card validation, many places don't validate credit card numbers (i.e doing the validation checksum, checking if the card is a mastercard that it's got the mastercard prefix) before sending them to the card processor site. If the card processing services rejects the card and the user has to re-enter the card details, chance are they won't bother and you've lost yourself a sale. If you validated for obvious mistakes on-the-fly (i.e user sees error immediately) you wouldn't lose as many of those customers.
You could also do things like supplementing the user supplied data, say the user supplies an address you could automatically geocode it and put it in a hidden field for the website.
So you mean client side validation correct? I mean to validate form submission that needs server side information, you would still need to build something on your own.
Yes. Normally a user filling in a form is the last step before conversion (signup, purchase, etc) so any users you lose at that step are horrendously expensive, good client side validation can make a significant difference.
Validation for the purpose of having clean data in your database is obviously important too, but less so. But obviously if you had a service for providing the first it wouldn't be hard to offer it as a server side services as well.
Comments
Hmm I think trying to convert such a task into a service will always introduce some language to describe your field and it's constraints and then you might as well write it yourself.
Also with such a critical part of your system, getting information from your user, if the service is slow or down you will run into troubles.
What specific programming languages and/or frameworks do you require a solution for? Please let me know if I missed the point completely. Thanks for your answer!
Well I was imagining some kind of ajax thing that validated fields on the fly as the user filled them in.
Validation is non-trivial for many fields. For example almost no-one implements email validation correctly as per the RFC because it's hard to get right, and most people just use a hacky regex that ends up accepting invalid emails and rejecting valid ones.
Or with credit card validation, many places don't validate credit card numbers (i.e doing the validation checksum, checking if the card is a mastercard that it's got the mastercard prefix) before sending them to the card processor site. If the card processing services rejects the card and the user has to re-enter the card details, chance are they won't bother and you've lost yourself a sale. If you validated for obvious mistakes on-the-fly (i.e user sees error immediately) you wouldn't lose as many of those customers.
You could also do things like supplementing the user supplied data, say the user supplies an address you could automatically geocode it and put it in a hidden field for the website.
So you mean client side validation correct? I mean to validate form submission that needs server side information, you would still need to build something on your own.
Yes. Normally a user filling in a form is the last step before conversion (signup, purchase, etc) so any users you lose at that step are horrendously expensive, good client side validation can make a significant difference.
Validation for the purpose of having clean data in your database is obviously important too, but less so. But obviously if you had a service for providing the first it wouldn't be hard to offer it as a server side services as well.