Field Textarea

Textarea components are used for collecting large amounts of textual data.

Error

Set manually the field in State 'error'.

If the Field is used within an EditForm, an EditContext will be cascaded, and the Error and Validation will be manage automatically by the EditContext.

TypeDefault Value
boolfalse
An error occur.
This is a hint
<NVFieldTextArea Error Margin=". . 3"/>  
<NVFieldTextArea  
  Error 
  Message="This is a hint" 
  Validation="An error occur."
/>

Label

Label define the label value of the Textarea Field.

TypeDefault Value
stringnull
<NVFieldTextArea Name="labelSample" Label="This is a label"/>

Message

Message define a 'hint ' message for the Textarea Field.

TypeDefault Value
stringnull
This is a message
<NVFieldTextArea Message="This is a message"/>

Name

Name define the unique name for a field.
It will add name and id attributes of the input. If there is a label will also add the for attribute to the label.

When for is provided to a label element and when an id is provided, with the same value, to an input element, the label click will focus the input.

If an EditContext is provided by the EditForm, the FieldIdentifier.FieldName will be used.

If you don't pass a this parameter, an autoName will be generated and used within attributes of input and label. (since v1.0-rc.6)

TypeDefault Value
stringnull
<NVFieldTextArea Name="uniqueName" Label="This is a label"/>

NVFieldAfter

Add content after the 'texarea' element.

TypeDefault Value
RenderFragmentnull
<NVFieldTextArea Name="FieldAfter" Label="FieldAfter">
  <NVFieldAfter>
    <NVIcon Name="search"/>
  </NVFieldAfter>
</NVFieldTextArea>

NVFieldBefore

Add content before the 'texarea' element.

TypeDefault Value
RenderFragmentnull
<NVFieldTextArea Name="FieldBefore" Label="FieldBefore">
  <NVFieldBefore>
    <NVIcon Name="search"/>
  </NVFieldBefore>
</NVFieldTextArea>

NVFieldLabel

FieldLabel define the content of the label of the Textarea Field.

TypeDefault Value
RenderFragmentnull
<NVFieldTextArea Name="FieldLabel">
  <NVFieldLabel>
    This is a <NVBlock Tag="strong" TextColor="error">label</NVBlock>
  </NVFieldLabel>
</NVFieldTextArea>

NVFieldMessage

When you need a more complex (with html markups) message, you can use FieldMessage RenderFragment.

TypeDefault Value
RenderFragmentnull
This is a message with markups
<NVFieldTextArea>
  <NVFieldMessage>This is a message with <strong>markups</strong></NVFieldMessage>
</NVFieldTextArea>

NVFieldValidation

When you need a more complex (with html markups) Validation message, you can use FieldValidation RenderFragment.
It will override the Validation message, coming from Model/EditContext or from Validation Parameter.

TypeDefault Value
RenderFragmentnull
This is a validation message
<NVFieldTextArea Error>
  <NVFieldValidation>This is a <strong>validation</strong> message</NVFieldValidation>
</NVFieldTextArea>

Placeholder

Placeholder define the placeholder value of the Textarea Field.

TypeDefault Value
stringnull
<NVFieldTextArea Placeholder="This is a placeholder"/>

Readonly

Set the Field input as readonly.

TypeDefault Value
boolfalse
<NVFieldTextArea Readonly />

Required

Set the Field as required. This adds an * after the label.

TypeDefault Value
boolfalse
<NVFieldTextArea Name="Required" Label="Required" Required />

Rows

Rows let us to change to number of lines display by the textarea.

TypeDefault Value
string6
<NVFieldTexarea Row="2" Value="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et ex nunc. Nulla facilisi. Curabitur massa mauris, malesuada vel ipsum ac, varius suscipit nunc. Mauris ac condimentum justo. Nulla congue sem vel ante volutpat, sed semper quam varius. Nam et lectus sit amet arcu pharetra sodales. Donec mi neque, lacinia ut gravida vel, fringilla in dui. Nunc non velit neque." />

Success

Set the field in State 'success'.

TypeDefault Value
boolfalse
Well done !
This is a hint
<NVFieldTextArea Success Margin=". . 3"/>
<NVFieldTextArea  
  Success 
  Message="This is a hint" 
  Validation="Well done !"
/>