Problem

Create a Lightning web component (LWC) to accept an input text from users.

The component must implement the lightning-input field to capture the user input.

Instructions:

  • Create a lightning-input field labeled "Name".
  • Set minimum character length of 2 for the input field.
  • Set maximum character length of 40 for the input field.

Note : This exercise introduces you to creating a simple LWC input field with validations. Focus on meeting the requirements, and feel free to validate your code using the execute button.

To lean more about lightning web components, click here to visit the lightning web components developers guide

×
+
Code Editor
index.js
styles.css
components
package.json