I need to write few class which are to be used to validate the data.

I know some validations which we will use generally.

if anybody knows more please help me by providing the list of some more validations.


The validations which I know are as follows:

String:

length
isAlpha
isAlphaNumeric
isLower
isUpper
isNull


Numeric
isNumber
lengthOfDigits
isPositive
isNegative
isInt
isFraction
lessThan
greaterThan
equals
isInRange

Date
isValidDate
isLessthan
isGreaterthan
isequalto


General

email
postalcode
telephoneNumber

I would suggest to continue with the application and implement whatever validation you require as you progress.

Postcodes and telephone numbers need to be localised.
Date: is WorkingDay / isHoliday (also localised).
Credit card number check digit.

Are all these going to extend an abstract Validation class, or implement a Validation interface? What will the calling protocol look like? Will you use a return code or an Exception for errors?

Will you provide higher-level convenience methods such as: check a String against a list of validations and display default error messages if it fails?

Keep us updated on this project - it looks really interesting and potentially VERY useful. Good luck.

This article has been dead for over six months. Start a new discussion instead.