Đã hoàn thành

Add validation messages to a login form

Dự án này đã kết thúc thành công bởi allenav với giá $30 AUD trong 1 ngày.

Nhận tin báo giá cho dự án tương tự
Ngân sách dự án
$10 - $30 AUD
Đã hoàn thành trong
1 ngày
Tổng đặt giá
23
Mô tả dự án

I have a working login form which communicates with a backend server that is able to validate the login. The project uses the angular 2 javascript framework.

I need to enhance the form so that it provides validation to the login form, and error handling.

Before the form is submitted.

checks that the email has been entered

checks that the password has at least 5 characters

If any of the above checks failed to highlight the entry field and display a message below of the requirement.

Then when the form is submitted and the response received (this code is working ok) there will be a status field that the back end sets if the login passed or failed against the database.

If the status is > 0 then show an alert error on the login screen. (this needs to be added). The alert message comes from the returned statustext in the json response returned from the backend (this is already working.

If the status is 0 to return to the dashboard and display the user's name (this code is already working)

The response to a login request returns a json with the fields below: (if status is 0 the all the fields are set with the user's data, if the status is not 0 all fields are empty except status and statustext. (this code is already working)

id

firstname

surname

email

status

statustext

status 0 login and password is correct

Where the statustext for each error is shown below::-

status 1 user not on file please register

status 2 Invalid password

status 3 Password required

If the user has entered data and the returned status is not 0 then display an alert on the login form The alert shows the statustext returned from the backend.

the source code is on github in the login-validation branch

[url removed, login to view]

Được hoàn thành bởi:
Các kỹ năng được yêu cầu

Muốn kiếm tiến?

  • Hạn định ngân sách và khung thời gian
  • Mô tả đề xuất của bạn
  • Nhận thanh toán cho công việc của bạn

Thuê những Freelancer đã đặt giá trong dự án này

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online