loopback icon indicating copy to clipboard operation
loopback copied to clipboard

"trim" and "lowercase" convertions and formatting properties not working

Open veekungx opened this issue 12 years ago • 7 comments

{ "name": "Post", "base": "PersistedModel", "properties": { "title": { "type": "string", "required": true, "trim": true, "lowercase": true }

},
"validations": [],
"relations": {},
"acls": [],
"methods": []

}

the "trim" and "lowercase" on "title" properties not work when I post data to the API I got response with

{ "title": "SDFSFSDF ", "id": "54049e7fb36b19c817a00012" }

Did I do something wrong or misunderstand ?

veekungx avatar Sep 01 '14 16:09 veekungx

Unfortunately, this is currently not working - see also: https://github.com/strongloop/loopback-datasource-juggler/issues/128

fabien avatar Sep 01 '14 17:09 fabien

@raymondfeng Should this be labeled as a doc issue? If so, can you clarify what needs to be changed or added to docs?

crandmck avatar Feb 26 '15 01:02 crandmck

@crandmck looks like this issue is lost in refactoring ... I think what is being referenced to is http://docs.strongloop.com/display/public/LB/Model+definition+JSON+file (not sure). As to if the code contains what is in the doc is "interesting" @raymondfeng would have to get back on the issue


Was this an issue for loopback or loopback-datasource-juggler ... Multi-Repo hell :(

OwenBrotherwood avatar May 19 '15 17:05 OwenBrotherwood

From https://github.com/strongloop/loopback-datasource-juggler/issues/128, it looks like property and conversion options are not working / supported. @raymondfeng can you confirm? If that's true, I should remove that section from the docs (until it's fixed).

crandmck avatar May 19 '15 22:05 crandmck

This should definitely be removed

BerkeleyTrue avatar Aug 06 '15 01:08 BerkeleyTrue

I "commented out" that section from http://docs.strongloop.com/display/LB/Model+definition+JSON+file, so it won't be visible to general viewers.

crandmck avatar Aug 06 '15 16:08 crandmck

Going to close this since the issue is addressed. Will need to add it back once those features are actually implemented.

crandmck avatar Aug 18 '15 17:08 crandmck