in reply to Re: Efficient way to do field validation
in thread Efficient way to do field validation

I am not here for asking how to validate the fields. Neither I am expecting code-for-free. As I mentioned in the original post I am selecting and validating each field using appropriate regex. What I am looking for is a better method to do the validation - something similar to c++ class definition. Can we have a hash defined with specific regex keys and check if the value match ?

Replies are listed 'Best First'.
Re^3: Efficient way to do field validation
by ww (Archbishop) on Jul 31, 2013 at 16:56 UTC
    Yes.

    Update (after keeping my peace long enough to reach a slow burn):

    What you said about validating in the OP was "Now how should I validate each fields ?" which I don't read as congruent with "(a)s I mentioned in the original post I am selecting and validating each field using appropriate regex" as you're now asserting.

    Yes, you stated that you were splitting the record into "columns and taking it to variables." -- again, a statement at some remove from your new version .

    So yes, I'm taking offense at your reply, as you did at my reply -- an attempt to point out two obvious ways to do some form of validation (and a request that you provide your criteria for determining if an entry is valid). It's not, IMO, a gracious response to an attempt to help with what appeared to be a noob question.... posed in the manner of someone who hasn't read On asking for help and How do I post a question effectively?. (Without your code, it's hard to guess if one can provide a more efficient was to do field validation.)

      I didnt wanted to offend you, that was not my intention. Sorry for that.