Copy link to clipboard
Copied
I have pulled all of the datatypes from a query to the database that equate to each variable pulled from the database.
For example:
2016-04-21 07:55:12.0, datetime
Atlanta, nvarchar
I have users select the variable from a select box which also passes the datatype to the next page.
So passed to the second page, for example are, StreetAddress and nvarchar.
On the next page I want to validate in a cfinput, type = text, that the text entered is the database match for nvarchar (or int, datetime, varchar, etc)
Is it possible to match exactly with the database or is my best bet just using the validate for integer and date, default char, as are available in the cfinput validate function?
B.
It might be possible but I would not use cfinput to do it. I would do my own client-side validation using the input tag with jquery.validation and write my own server-side validation. Cfinput validation is very remedial and outdated by today's standards. And always get in the habit of using both client-side and server-side validation - client-side is for the user experience, server-side is to keep you application from being hacked.
Copy link to clipboard
Copied
It might be possible but I would not use cfinput to do it. I would do my own client-side validation using the input tag with jquery.validation and write my own server-side validation. Cfinput validation is very remedial and outdated by today's standards. And always get in the habit of using both client-side and server-side validation - client-side is for the user experience, server-side is to keep you application from being hacked.