>Have you looked at django.core.validators? There's one in there called
>RequiredIfOtherFieldNotGiven that might do what you want. You'd want
>to make both fields blank=True and add that validator to
>validator_list
Keep in mind that cross-field-validators only work on the main record,
not on pos
On 1/6/06, Kevin <[EMAIL PROTECTED]> wrote:
>
> The main issue is, I'm trying to add a constraint that the user enter
> EITHER a phone number OR an email. So I thought I could write a custom
> validator that took the all_data param and did the check.
Have you looked at django.core.validators? Th
I'm sure this has been asked before, but googling didn't turn up a
solution.
I have the following class:
class ContactInfo(meta.Model):
name = meta.CharField()
phone = meta.PhoneNumberField(blank=True)
email = meta.EmailField(blank=True)
And I'm trying to present a form to the user
3 matches
Mail list logo