PersonForm Component
A form for registering a person. Handles field validation and submission.
Displays validation errors and success notifications using react-toastify.
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
props |
Object |
Properties
|
- Source:
Returns:
The rendered registration form
- Type
- JSX.Element
Methods
(private, inner) handleChange(e)
Handle form field changes.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Event | Input change event |
- Source:
(private, inner) handleSubmit(e)
Handle form submission.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Event | Submit event |
- Source:
(private, inner) validateField(name, value)
Validate a single form field and update the error state.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Field name |
value |
string | Field value |
- Source: