hunyadi-dev commented on a change in pull request #821:
URL: https://github.com/apache/nifi-minifi-cpp/pull/821#discussion_r456291644



##########
File path: libminifi/include/core/PropertyValidation.h
##########
@@ -259,6 +259,22 @@ class UnsignedLongValidator : public PropertyValidator {
   }
 };
 
+class NonBlankValidator : public PropertyValidator {
+ public:
+  explicit NonBlankValidator(const std::string& name)
+      : PropertyValidator(name) {
+  }
+  ~NonBlankValidator() override = default;
+
+  ValidationResult validate(const std::string& subject, const 
std::shared_ptr<minifi::state::response::Value>& input) const final {
+    return validate(subject, input->getStringValue());
+  }
+
+  ValidationResult validate(const std::string& subject, const std::string& 
input) const final {
+    return 
ValidationResult::Builder::createBuilder().withSubject(subject).withInput(input).isValid(utils::StringUtils::trimLeft(input).size()).build();

Review comment:
       Should not be a factor in readibility.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to