I'm using a socket server that is based off of java and it allows java extensions to be implemented that allow server side login to be performed. I want to create a signup/login system but I'm struggling with finding a way to validate/filter user input before manipulating with the database.
1. I want to check for the type (string or integer)
2. I want to check for the length of strings to ensure they are within a given range
3. I want to be able to determine if a field contains a valid email address
4. I want to be able to remove invalid characters easily from any string
5. I want to sanitize before using with database.Does Java have an easy way for me to do all of these things?
If anyone knows of a free class, framework, library that handles all of these tasks, please let me know about it.Ricky
Some of these things might be desirable, but surely it would be a waste of time to actually search for code out there that would verify the length of the String for you? You *should* be able to write that piece of code in under 10 seconds. And PS, the only way to determine if an email address is valid is to email that address and require some type of a response from the account holder. On sites like daniweb this is done through some type of auto generated link that …