opRequired

Type: TParseOption | Unit: EgStrParser

The whole input (after opTrim, when set) must not be empty. The check runs before tokenization, so it applies to the whole input, not to each token. Empty input sets ResultType to otInvalid and ErrorCode to ERR_EMPTY_NOT_ALLOWED.

Input: (empty), itInteger, [opRequired]
  ResultType: otInvalid
  ErrorCode:  ERR_EMPTY_NOT_ALLOWED

Input: "  ", itString, [opRequired, opTrim]
  ResultType: otInvalid
  ErrorCode:  ERR_EMPTY_NOT_ALLOWED

For itString without opTrim, spaces are a value and do not trigger this error; combine opRequired with opTrim to reject them.

opRequired is checked before opNotNull: when both are set and the input is empty, only ERR_EMPTY_NOT_ALLOWED is returned. To reject empty list positions as well, use opNotNull.

See Also

(C) 2026 Easygate, Lda