Loading ...
Sorry, an error occurred while loading the content.

Proposal: open source field validation library/behavior

Expand Messages
  • richard g
    This working group seems an ideal collection of interests to tackle this common problem: How can we bring field validation and input masking to Rev? Should it
    Message 1 of 17 , Feb 25, 2010
    View Source
    • 0 Attachment
      This working group seems an ideal collection of interests to tackle this common problem:

      How can we bring field validation and input masking to Rev?

      Should it be a behavior, or a library?

      Who here would have time/interest to contribute?
    • Trevor DeVore
      ... I m inclined to say a behavior with a plug-in palette that allows you to drag/drop validations on a field. -- Trevor DeVore Blue Mango Learning Systems
      Message 2 of 17 , Feb 25, 2010
      View Source
      • 0 Attachment
        On Feb 25, 2010, at 10:00 AM, richard g wrote:
        > This working group seems an ideal collection of interests to tackle
        > this common problem:
        >
        > How can we bring field validation and input masking to Rev?
        >
        > Should it be a behavior, or a library?
        >
        > Who here would have time/interest to contribute?
        >

        I'm inclined to say a behavior with a plug-in palette that allows you
        to drag/drop validations on a field.

        --
        Trevor DeVore
        Blue Mango Learning Systems
        ScreenSteps: http://www.screensteps.com
        Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
      • David Bovill
        Yes - a behavior! In my work I use a record type for each view - having a record type allows automatic creation of views, each with an appropriate form of
        Message 3 of 17 , Feb 26, 2010
        View Source
        • 0 Attachment
          Yes - a behavior!

          In my work I use a record "type" for each view - having a record type allows
          automatic creation of views, each with an appropriate form of data
          validation from a db, or text based schema (like x-forms). Quite a lot of
          the above was inspired by Django, and I think a key objective would be to
          allow some level of interop with existing frameworks that have tackled the
          same issue?

          On 25 February 2010 15:02, Trevor DeVore <lists@...> wrote:

          > On Feb 25, 2010, at 10:00 AM, richard g wrote:
          > > This working group seems an ideal collection of interests to tackle
          > > this common problem:
          > >
          > > How can we bring field validation and input masking to Rev?
          > >
          > > Should it be a behavior, or a library?
          > >
          > > Who here would have time/interest to contribute?
          >


          [Non-text portions of this message have been removed]
        • Andre Garzia
          I think Trevors idea of a behaviour plus a plugin so we could drop behaviours on fields would be a marvelous thing! I can t stress how much I d like to see it
          Message 4 of 17 , Feb 26, 2010
          View Source
          • 0 Attachment
            I think Trevors idea of a behaviour plus a plugin so we could drop behaviours on fields would be a marvelous thing!

            I can't stress how much I'd like to see it done! How can I help?

            :D

            (wow, the first revInterop release in ages)

            On Feb 26, 2010, at 6:13 AM, David Bovill wrote:

            > Yes - a behavior!
            >
            > In my work I use a record "type" for each view - having a record type allows
            > automatic creation of views, each with an appropriate form of data
            > validation from a db, or text based schema (like x-forms). Quite a lot of
            > the above was inspired by Django, and I think a key objective would be to
            > allow some level of interop with existing frameworks that have tackled the
            > same issue?
            >
            > On 25 February 2010 15:02, Trevor DeVore <lists@...> wrote:
            >
            > > On Feb 25, 2010, at 10:00 AM, richard g wrote:
            > > > This working group seems an ideal collection of interests to tackle
            > > > this common problem:
            > > >
            > > > How can we bring field validation and input masking to Rev?
            > > >
            > > > Should it be a behavior, or a library?
            > > >
            > > > Who here would have time/interest to contribute?
            > >
            >
            > [Non-text portions of this message have been removed]
            >
            >



            [Non-text portions of this message have been removed]
          • richard g
            Looks like we have a consensus toward behaviors over libraries. My only interest in suggesting we consider a library is in light of the current limitation that
            Message 5 of 17 , Feb 26, 2010
            View Source
            • 0 Attachment
              Looks like we have a consensus toward behaviors over libraries.

              My only interest in suggesting we consider a library is in light of the current limitation that an object can have only one behavior assigned to it, so once you assign it a field validation behavior you lose the possibility of using any other behavior with it.

              But it may well be the case that the objects you'd want to use such a behavior for wouldn't likely need anything else, so a behavior it is.

              I think the next steps are to define what we want it to do, and then to agree on the names of the properties and accessors needed to make that happen.

              We may be able to break this down into two parts: masking and validation. One happens as data is entered, the other after data has been entered.

              What conventions are used for these in other popular systems?

              What input types should we support?

              For things like dates, should this tool also provide a picker?

              If so, do we need two, one for single dates and another for ranges?

              What other data types might benefit from pickers?
            • Tereza Snyder
              ... me too, me too! -- Tereza Snyder Califex Software, Inc.
              Message 6 of 17 , Feb 26, 2010
              View Source
              • 0 Attachment
                On Feb 26, 2010, at 7:10 AM, Andre Garzia wrote:

                > I think Trevors idea of a behaviour plus a plugin so we could drop behaviours on fields would be a marvelous thing!
                >
                > I can't stress how much I'd like to see it done! How can I help?


                me too, me too!


                --
                Tereza Snyder
                Califex Software, Inc.
                <www.califexsoftware.com>
              • Andre Garzia
                If we implement all validations in a single behaviour then we can assign multiple validations to a given field by using a custom property holding which
                Message 7 of 17 , Feb 26, 2010
                View Source
                • 0 Attachment
                  If we implement all validations in a single behaviour then we can assign multiple validations to a given field by using a custom property holding which validations we want. For example, a field could have a uValidations property with contents like "nonumbers,onlyalpha" meaning it would accept only alphanumeric characters and the other that would not accept numbers, so in effect this would only accept letters but not numbers or punctuation. We could in the behaviour, loop thru the uValidations of me and check against each case.

                  Proposed validations:
                  * only alphanumeric characters
                  * no numbers
                  * no spaces
                  * date only
                  * time only
                  * date & time only
                  * email
                  * check against SQL injection (if it accepts input from the user and inserts it into a database, specially a remote one, this becomes a biggie)
                  * max characters
                  * min characters

                  As for masking, I have no clue!

                  Cheers
                  andre




                  On Feb 26, 2010, at 10:22 AM, richard g wrote:

                  > Looks like we have a consensus toward behaviors over libraries.
                  >
                  > My only interest in suggesting we consider a library is in light of the current limitation that an object can have only one behavior assigned to it, so once you assign it a field validation behavior you lose the possibility of using any other behavior with it.
                  >
                  > But it may well be the case that the objects you'd want to use such a behavior for wouldn't likely need anything else, so a behavior it is.
                  >
                  > I think the next steps are to define what we want it to do, and then to agree on the names of the properties and accessors needed to make that happen.
                  >
                  > We may be able to break this down into two parts: masking and validation. One happens as data is entered, the other after data has been entered.
                  >
                  > What conventions are used for these in other popular systems?
                  >
                  > What input types should we support?
                  >
                  > For things like dates, should this tool also provide a picker?
                  >
                  > If so, do we need two, one for single dates and another for ranges?
                  >
                  > What other data types might benefit from pickers?
                  >
                  >



                  [Non-text portions of this message have been removed]
                • David Bovill
                  ... In practice this would no be an issue for me - virtually all the cases in which I would use this the field or control would be inside a group, and the
                  Message 8 of 17 , Feb 26, 2010
                  View Source
                  • 0 Attachment
                    On 26 February 2010 13:22, richard g <Ambassador@...> wrote:

                    > Looks like we have a consensus toward behaviors over libraries.
                    >
                    > My only interest in suggesting we consider a library is in light of the
                    > current limitation that an object can have only one behavior assigned to it,
                    > so once you assign it a field validation behavior you lose the possibility
                    > of using any other behavior with it.
                    >

                    In practice this would no be an issue for me - virtually all the cases in
                    which I would use this the field or control would be inside a group, and the
                    behavior would be attached to the particular control. As it is the groups
                    that have the view specific logic - it is the groups that I would have my
                    own custom behaviors attached to and would have no issues with attaching a
                    behavior to an individual control?


                    *Is it worth looking out how various open source frameworks do this?*

                    - http://docs.djangoproject.com/en/dev/ref/forms/validation/ -- this made
                    sense to me in terms of making this compatible with Rev
                    - http://framework.zend.com/manual/en/zend.validate.set.html -- not
                    looked at in detail, maybe some leaning there?
                    - http://www.w3.org/TR/xforms11/#datatypes-xforms - a standard but maybe
                    not so useful in practice?


                    [Non-text portions of this message have been removed]
                  • Tereza Snyder
                    ... I would break it down this way: * Date * Time * Date & Time * Email * Text: * accept spaces * accept numbers * accept alphabetic * accept cr * accept
                    Message 9 of 17 , Feb 26, 2010
                    View Source
                    • 0 Attachment
                      On Feb 26, 2010, at 9:29 AM, Andre Garzia wrote:

                      >
                      > Proposed validations:
                      > * only alphanumeric characters
                      > * no numbers
                      > * no spaces
                      > * date only
                      > * time only
                      > * date & time only
                      > * email
                      > * check against SQL injection (if it accepts input from the user and inserts it into a database, specially a remote one, this becomes a biggie)
                      > * max characters
                      > * min characters

                      I would break it down this way:

                      * Date
                      * Time
                      * Date & Time
                      * Email
                      * Text:
                      * accept spaces
                      * accept numbers
                      * accept alphabetic
                      * accept cr
                      * accept non-alphanumeric [ list ]
                      * max chars
                      * min chars

                      Rejecting SQL should be an option

                      Adding a Boolean callback function for further validation might be a good idea.


                      t



                      --

                      . . .. ... ..... ACT AGAINST ENTROPY! ..... ... .. . .



                      [Non-text portions of this message have been removed]
                    • Mark Wieder
                      Andre- ... Having been through this one before, let me say that what constitutes a valid email address is a bit of a gray area, so there may not be a
                      Message 10 of 17 , Feb 26, 2010
                      View Source
                      • 0 Attachment
                        Andre-

                        Friday, February 26, 2010, 7:29:21 AM, you wrote:

                        > Proposed validations:
                        > * email

                        Having been through this one before, let me say that what constitutes
                        a valid email address is a bit of a gray area, so there may not be a
                        one-size-fits-all validation technique: what punctuation is allowed /
                        disallowed? What is a valid TLD? Should we validate numeric ip
                        addresses?

                        --
                        -Mark Wieder
                        mwieder@...
                      • richard g
                        Here s a link to the Rev forum thread which prompted this project: http://forums.runrev.com/phpBB2/viewtopic.php?f=6&t=4911 There are a couple links there to
                        Message 11 of 17 , Mar 24, 2010
                        View Source
                        • 0 Attachment
                          Here's a link to the Rev forum thread which prompted this project:
                          http://forums.runrev.com/phpBB2/viewtopic.php?f=6&t=4911

                          There are a couple links there to other masking filters which may inspire solutions for us.

                          To keep this moving forward we should identify at least a dozen or so of the most common input types and figure out a useful syntax/property name set for the user to define those.

                          Once we have that in place I'll take a few minutes to put that into a first draft of the behavior script which we can then modify, refine, and enhance.

                          Here's a few to get us started:

                          - number
                          - integer
                          - date
                          - string no longer than n chars
                          - email address
                          - URL

                          What else?
                        • Tereza Snyder
                          ... string containing nothing but hex digits string limited/transformed to upper/lower case good password string ( N chars, mixed case, at least 1 number, at
                          Message 12 of 17 , Mar 24, 2010
                          View Source
                          • 0 Attachment
                            On Mar 24, 2010, at 7:40 AM, richard g wrote:
                            > …

                            > Here's a few to get us started:
                            >
                            > - number
                            > - integer
                            > - date
                            > - string no longer than n chars
                            > - email address
                            > - URL
                            >
                            > What else?

                            string containing nothing but hex digits
                            string limited/transformed to upper/lower case
                            "good" password string (>N chars, mixed case, at least 1 number, at least 1 non-alphanumeric character)

                            t

                            --
                            Tereza Snyder
                            Califex Software, Inc.
                            <www.califexsoftware.com>
                          • Andre Garzia
                            ... ip entry time geo location (latitude, longitude)
                            Message 13 of 17 , Mar 24, 2010
                            View Source
                            • 0 Attachment
                              On Mar 24, 2010, at 10:24 AM, Tereza Snyder wrote:

                              >
                              > On Mar 24, 2010, at 7:40 AM, richard g wrote:
                              >> …
                              >
                              >> Here's a few to get us started:
                              >>
                              >> - number
                              >> - integer
                              >> - date
                              >> - string no longer than n chars
                              >> - email address
                              >> - URL
                              >>
                              >> What else?
                              >
                              > string containing nothing but hex digits
                              > string limited/transformed to upper/lower case
                              > "good" password string (>N chars, mixed case, at least 1 number, at least 1 non-alphanumeric character)

                              ip entry
                              time
                              geo location (latitude, longitude)

                              >
                              > t
                              >
                              > --
                              > Tereza Snyder
                              > Califex Software, Inc.
                              > <www.califexsoftware.com>
                              >
                              >
                              >
                              >
                              >
                              >
                              > ------------------------------------
                              >
                              > Yahoo! Groups Links
                              >
                              >
                              >
                            • Malte Pfaff-Brill
                              date is rather complex and has to be split up into multiple formats I guess: system date (and this one can bite terribly at least on the mac) english date
                              Message 14 of 17 , Mar 24, 2010
                              View Source
                              • 0 Attachment
                                date is rather complex and has to be split up into multiple formats I guess:

                                system date (and this one can bite terribly at least on the mac)
                                english date mm/dd/yyyy
                                australian date dd/mm/yyyy
                                continental european date dd.mm.yyyy
                                mySQL date yyyy-mm-dd hh:mm:ss

                                time hh:mm
                                long time hh:mm:ss

                                date and time (in all of the variations above)

                                timestamp (the seconds)

                                Am 24.03.2010 um 15:47 schrieb Andre Garzia:

                                >
                                > On Mar 24, 2010, at 10:24 AM, Tereza Snyder wrote:
                                >
                                >>
                                >> On Mar 24, 2010, at 7:40 AM, richard g wrote:
                                >>> …
                                >>
                                >>> Here's a few to get us started:
                                >>>
                                >>> - number
                                >>> - integer
                                >>> - date
                                >>> - string no longer than n chars
                                >>> - email address
                                >>> - URL
                                >>>
                                >>> What else?
                                >>
                                >> string containing nothing but hex digits
                                >> string limited/transformed to upper/lower case
                                >> "good" password string (>N chars, mixed case, at least 1 number, at least 1 non-alphanumeric character)
                                >
                                > ip entry
                                > time
                                > geo location (latitude, longitude)
                                >
                                >>
                                >> t
                                >>
                                >> --
                                >> Tereza Snyder
                                >> Califex Software, Inc.
                                >> <www.califexsoftware.com>
                                >>
                                >>
                                >>
                                >>
                                >>
                                >>
                                >> ------------------------------------
                                >>
                                >> Yahoo! Groups Links
                                >>
                                >>
                                >>
                                >
                                >
                                >
                                > ------------------------------------
                                >
                                > Yahoo! Groups Links
                                >
                                >
                                >

                                --
                                Malte Brill
                                CEO derbrill Multimedia
                                CTO awesome mega mighty games
                                VAT ID DE223571286
                                Tel: +49 4331 337 977 7
                                email: info@...
                                malte@...
                              • Alain Farmer
                                Hello, You might want to support the same datatypes that FM, mySQL, PHP, XML, XML-Schema, and *others* are using, eg. the ones defined by the W3C. Here s an
                                Message 15 of 17 , Mar 24, 2010
                                View Source
                                • 0 Attachment
                                  Hello,

                                  You might want to support the same datatypes that FM, mySQL, PHP, XML, XML-Schema, and *others* are using, eg. the ones defined by the W3C. Here's an image that maps them out:

                                  http://www.w3.org/TR/xmlschema-2/type-hierarchy.gif

                                  This is about as universal as you can get. Any tool that handles data should is-likely-to support these datatypes. If we support them then interoperability with just about anything... will be *insured*. :-))

                                  Btw there are established GREP-patterns to identify and parse these datatypes. And Transcript's GREP is compatible with GREP-in-general. Therefore : we can use Rev's GREP to parse and validate such datatypes ... rather easily, I might add. :)

                                  Think about it, :)

                                  Alain

                                  > [revInterop] Re: Proposal: open source field
                                  > validation library/behavior
                                  > To: revInterop@yahoogroups.com
                                  >
                                  > Here's a link to the Rev forum thread
                                  > which prompted this project:
                                  > forums.runrev.com/phpBB2/viewtopic.php?f=6&t=4911
                                  >
                                  > There are a couple links there to other
                                  > masking filters which may inspire solutions
                                  > for us.
                                  >
                                  > To keep this moving forward we should
                                  > identify at least a dozen or so of the
                                  > most common input types and figure out
                                  > a useful syntax/property name set for
                                  > the user to define those.
                                  >
                                  > Once we have that in place I'll take
                                  > a few minutes to put that into a first
                                  > draft of the behavior script which we
                                  > can then modify, refine, and enhance.
                                  >
                                  > Here's a few to get us started:
                                  >
                                  > - number
                                  > - integer
                                  > - date
                                  > - string no longer than n chars
                                  > - email address
                                  > - URL
                                  >
                                  > What else?


                                  __________________________________________________________________
                                  Looking for the perfect gift? Give the gift of Flickr!

                                  http://www.flickr.com/gift/
                                • henk.vandervelden
                                  I m ready to help as well. Maybe I could start writing some functions?
                                  Message 16 of 17 , Jun 1, 2010
                                  View Source
                                  • 0 Attachment
                                    I'm ready to help as well. Maybe I could start writing some functions?

                                    --- In revInterop@yahoogroups.com, Tereza Snyder <tereza@...> wrote:
                                    >
                                    >
                                    > On Feb 26, 2010, at 7:10 AM, Andre Garzia wrote:
                                    >
                                    > > I think Trevors idea of a behaviour plus a plugin so we could drop behaviours on fields would be a marvelous thing!
                                    > >
                                    > > I can't stress how much I'd like to see it done! How can I help?
                                    >
                                    >
                                    > me too, me too!
                                  • richard g
                                    ... Please do. This has been a dormant topic for far longer than something this useful warrants. I ve been wrapped up in client projects, and I imagine
                                    Message 17 of 17 , Jul 21, 2010
                                    View Source
                                    • 0 Attachment
                                      --- In revInterop@yahoogroups.com, "henk.vandervelden" <henk@...> wrote:
                                      >
                                      > I'm ready to help as well. Maybe I could start writing some
                                      > functions?

                                      Please do. This has been a dormant topic for far longer than something this useful warrants. I've been wrapped up in client projects, and I imagine others here have had similar commitments.

                                      Proposing a specific function or two might just be the thing we need to kickstart this process. Thanks for joining in.
                                    Your message has been successfully submitted and would be delivered to recipients shortly.