DirectoryValidator: handling empty field validation
This commit is contained in:
@@ -13,6 +13,9 @@ DirectoryValidator::DirectoryValidator(Wt::WObject *parent)
|
|||||||
Wt::WValidator::Result
|
Wt::WValidator::Result
|
||||||
DirectoryValidator::validate(const Wt::WString& input) const
|
DirectoryValidator::validate(const Wt::WString& input) const
|
||||||
{
|
{
|
||||||
|
if (input.empty())
|
||||||
|
return Wt::WValidator::validate(input);
|
||||||
|
|
||||||
boost::filesystem::path p(input.toUTF8());
|
boost::filesystem::path p(input.toUTF8());
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user