required

Requires that the templated value does not return a null or "" and will throw an error. Please note that the error will not specify the field that returned a blank value.

Input
  • {{ foo | required }}
Output
  • Liquid filter required Error: required value is null or blank.