#65 Open

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update default
hg pull -r default https://bitbucket.org/malthe/wtforms
hg merge 24bdc00d1aab
hg commit -m 'Merged in malthe/wtforms (pull request #65)'
  1. malthe

Added new validator NonNull which simply checks that there is a non-null raw value.

Comments (2)

  1. James Crasta

    The validator seems a bit odd, why would it check that raw_data is not None, instead of data? It seems a bit of a weird thing to check, that'd only check that there's no form data, because when there's any form data at all, raw_data is a list or tuple, and therefore not None.

    Also, since null is a SQL concept and not a python concept the validator belongs in ext/sqlalchemy/validators.py instead of the core validators.py, or it should be renamed to NotNone perhaps (though a bit weird then)

  2. malthe author

    I have renamed the validator to NotNone and moved it into ext/sqlalchemy.

    Note that it has to check raw_data because if there is "any form data at all" then it's okay. We just need to be compatible with the nullable constraint.