loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Check the Validations Before Updating

Open helloapiworld opened this issue 9 years ago • 3 comments

Hi I am new to loopback,can anyone help me how to do PUT api validations,what ever user will provide fields using loopback explorer those values has to update in model,remaining values are to take from Model(DB). For example i have 5 fields FirstName,LastName,UserName,Password,MobileNo FirstName,LastName and MobileNo can user able be update anytime but not UserName and Password. I don't have an idea how to check the validations for the fields FirstName,LastName and MobileNo. If user update any of those 3 fields i have to update the existing data for the fields otherwise i have to keep the old data. Could anyone help on this how to put validations for that.

image image

helloapiworld avatar May 10 '17 04:05 helloapiworld

@helloapiworld

Read this - http://loopback.io/doc/en/lb3/Migrating-to-3.0.html For validation - https://loopback.io/doc/en/lb3/Validating-model-data.html Make sure you ask questions at gitter (https://gitter.im/strongloop/loopback) or google group (https://groups.google.com/forum/#!forum/loopbackjs), not to create an issue.

This is not an issue.

padelagani avatar May 10 '17 07:05 padelagani

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 23 '17 14:08 stale[bot]

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

stale[bot] avatar Sep 06 '17 17:09 stale[bot]