Class InputStringFormBuilder<T extends InputStringFormElement,SELF extends InputStringFormBuilder<T,SELF>>

java.lang.Object
io.micronaut.views.fields.elements.InputStringFormBuilder<T,SELF>
Type Parameters:
T - The type of the InputStringFormElement
SELF - The type of the subclassed builder
Direct Known Subclasses:
InputEmailFormElement.Builder, InputPasswordFormElement.Builder, InputTelFormElement.Builder, InputTextFormElement.Builder, InputUrlFormElement.Builder

public abstract class InputStringFormBuilder<T extends InputStringFormElement,SELF extends InputStringFormBuilder<T,SELF>> extends Object
Base builder class for all InputStringFormElement builders.
Since:
4.1.0
Author:
Tim Yates
  • Field Details

    • name

      protected String name
      Name of the form control. Submitted with the form as part of a name/value pair.
    • id

      protected String id
      It defines an identifier (ID) which must be unique in the whole document.
    • placeholder

      protected String placeholder
      The placeholder attribute is a string that provides a brief hint to the user as to what kind of information is expected in the field.
    • required

      protected boolean required
      If true indicates that the user must specify a value for the input before the owning form can be submitted.
    • readOnly

      protected boolean readOnly
      A Boolean attribute which, if present, means this field cannot be edited by the user.
    • maxLength

      protected Number maxLength
      The maximum string length that the user can enter into the text input.
    • minLength

      protected Number minLength
      The minimum string length that the user can enter into the text input.
    • size

      protected Integer size
      The size attribute is a numeric value indicating how many characters wide the input field should be.
    • pattern

      protected String pattern
      The pattern attribute, when specified, is a regular expression that the input's value must match for the value to pass constraint validation.
    • value

      protected String value
      the input value.
    • errors

      protected List<Message> errors
      Input Errors.
    • label

      protected Message label
      message for an HTML Label element.
  • Constructor Details

    • InputStringFormBuilder

      public InputStringFormBuilder()
  • Method Details

    • pattern

      @NonNull public SELF pattern(@NonNull @NonNull String pattern)
      Parameters:
      pattern - The pattern attribute, when specified, is a regular expression that the input's value must match for the value to pass constraint validation.
      Returns:
      The Builder
    • required

      @NonNull public SELF required(boolean required)
      Parameters:
      required - If true indicates that the user must specify a value for the input before the owning form can be submitted.
      Returns:
      the Builder
    • readOnly

      @NonNull public SELF readOnly(boolean readOnly)
      Parameters:
      readOnly - A Boolean attribute which, if present, means this field cannot be edited by the user.
      Returns:
      the Builder
    • size

      @NonNull public SELF size(@NonNull @NonNull Integer size)
      Parameters:
      size - The size attribute is a numeric value indicating how many characters wide the input field should be.
      Returns:
      The Builder
    • maxLength

      @NonNull public SELF maxLength(@NonNull @NonNull Number maxLength)
      Parameters:
      maxLength - The maximum string length that the user can enter into the text input.
      Returns:
      The Builder
    • minLength

      @NonNull public SELF minLength(@NonNull @NonNull Number minLength)
      Parameters:
      minLength - The minimum string length that the user can enter into the text input.
      Returns:
      The Builder
    • name

      @NonNull public SELF name(@NonNull @NonNull String name)
      Parameters:
      name - Name of the form control. Submitted with the form as part of a name/value pair
      Returns:
      the Builder
    • id

      @NonNull public SELF id(@NonNull @NonNull String id)
      Parameters:
      id - It defines an identifier (ID) which must be unique in the whole document
      Returns:
      The Builder
    • placeholder

      @NonNull public SELF placeholder(@NonNull @NonNull String placeholder)
      Parameters:
      placeholder - The placeholder attribute is a string that provides a brief hint to the user as to what kind of information is expected in the field.
      Returns:
      the Builder
    • value

      @NonNull public SELF value(@NonNull @NonNull String value)
      Parameters:
      value - The value attribute of the input element
      Returns:
      the Builder
    • label

      @NonNull public SELF label(Message label)
      Parameters:
      label - represents a caption for an item in a user interface
      Returns:
      the Builder
    • errors

      @NonNull public SELF errors(@NonNull @NonNull List<Message> errors)
      Parameters:
      errors - Form element validation Errors.
      Returns:
      The builder
    • build

      @NonNull public abstract T build()
      Returns:
      Creates a InputTelFormElement.