• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Giving validation warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Giving validation warnings


  • Subject: Re: Giving validation warnings
  • From: Sam Barnum <email@hidden>
  • Date: Wed, 22 Oct 2003 14:36:09 -0700

If it isn't critical that this information is filled out, then a javascript confirm() might suffice. It would certainly be the easiest answer. Of course, you can't rely on javascript to be on, but that isn't such a big deal in this case, it seems. Just make sure that having some values null won't throw a ValidationException in the EOEnterpriseObject you're saving.

If you wanted to do this server-side, you'll need two separate validation methods. One is the bare minimum that will allow a record to be saved to the database, the other is more thorough and will show a warning if it fails, but the warning is overridable.

Maybe a good way to do this (although is seems kind of hack-ish) would be to have a boolean flag in your EOEnterpriseObject for "allow incomplete data". Then override validateForSave() in that entity and only throw a ValidationException for non-critical fields if that flag is false. If you save this boolean flag to the database, you can search on it later to find any records that are incomplete.

I'm sure there are many other ways you could do this, though.

Good luck!
Sam Barnum
360 Works
http://www.360works.com


On Wednesday, October 22, 2003, at 12:50 PM, Ray Ackland wrote:

I am wanting to provide a sort of validation check on the data the user inputs. I am aware, and reasonably familiar with the NSValidation stuff, but would like something more flexible.

What I am after is an ability to check the data (eg is the DOB entered & reasonable) and give a warning if not - but allow them to proceed if they choose to. An example is when a record is being created and some important information omitted because the user doesn't have that information yet. Would prefer to warn them, but let them save the rest of the information they do have.

Would I use some javascript methods instead?

Ray.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Giving validation warnings (From: Ray Ackland <email@hidden>)

  • Prev by Date: capitalizeFirstLetter ?
  • Next by Date: wait, nevermind
  • Previous by thread: Giving validation warnings
  • Next by thread: capitalizeFirstLetter ?
  • Index(es):
    • Date
    • Thread