Ticket #1519 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

Validators & None problems

Reported by: sprat Owned by: apoirier
Priority: major Component: uncategorized
Version: Keywords:
Cc:

Description

There are some problems when using a None value on some validators :

  • the StringValidator? accepts None as value but it fails on the not_empty check (not a ValueError?)
  • if we use strip/lstrip or rstrip and give a None value to the Validator, it raises an exception but not a ValueError?, so the Property.validate won't trap the error

I guess it should forbidden to use a None value in a validator but it would probably break existing projets, so I'm not sure what action should be taken.

Change History

comment:1 Changed 5 years ago by Alain Poirier <alain.poirier@…>

  • Status changed from new to closed
  • Resolution set to fixed

In [33bc9947db0d6b01326c9dace3d31ed9100c648c/core]:

Fixes #1519. The input to validate must be a string

Note: See TracTickets for help on using tickets.