#1187 Validate media IDs

phpGedView
open
nobody
5
2010-01-20
2010-01-20
Stevers
No

User input should be validated before it is accepted. Specifically, media identifiers can be used on the "link to existing media object" page that do not exist in the database. This needs to be case sensitive (per previous discussions) so entering "m123" should not be accepted if the ID is actually "M123." It would be nice if the program recognized that the wrong case was used and automatically correct to the correct case.

Individual and family identifiers should work the same.

Discussion

  • Stephen Arnold
    Stephen Arnold
    2010-02-06

    Autocomplete will advise you if a OBJE ID already exists as it matches those in the DB.
    I would not want to preclude the entry of any user input as that would also restrict the use of the IDentifier, which currently accepts any configuration as imported data may be in any format, with no regard to case.
    Stephen

     
  • Stevers
    Stevers
    2010-02-07

    Sorry, I didn't mean to imply phpGedView should always upper-case or lower-case the input, just that it should check whatever is entered and make sure it matches (on a case-sensitive basis) the IDs that are already in the system.

    Let's forget the case issue for now: why am I allowed to link to "zzzz" when "zzzz" doesn't exist? At least PhpGedView recognizes this situation and says "not in db" but I'm suggesting the software shouldn't allow the link to a non-existent object to be created and report an error back to the "link media to person" window.

    Back to case sensitive: if my media ID is "M99" and I enter "m99" why doesn't PhpGedView report that as "not in db?" If identifiers are case sensitive like you've said then it should be case sensitive when it presents the album pictures and say "not in db" instead of drawing a red box around the media (and allowing other corruption in the database).

    Autocomplete is not a substitute for data validation. I ignored the autocomplete list because that required the use of the mouse which dramatically slowed down the entire process. Data validation should not be bypassed.