Methods
fileSelectedHandler(event)
Picks up the file selected by user and converts it to base64 image and updates the state of component accordingly.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | Event object |
- Source:
onImageContainerClick()
This function simply makes a click to actual Input Element.
- Source:
render()
Renders the input form based on current state of the component.
- Source:
textInputHandler(event)
Executes at each keystroke of user for any input text field in the component. As soon as it receives any keystroke from user, this method updates the state of the component accordingly.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | Event object |
- Source:
uploadToServer(details)
After input data from the form is verified, this method is called to send the user details to the backend server. Upon success, user is redirected to login page, otherwise error message is rendered.
Parameters:
Name | Type | Description |
---|---|---|
details |
Object | Contains information about user, such as name, username, password, email etc |
- Source:
verifyInputs(event)
As soon as the user taps Submit button, this function fires up, and verifies if the inputs are valid or not. Various checks include, testing for "iitb.ac.in" domain name, testing for length of the password.
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | Event object |
- Source: