-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
RepositoryIssues related to @loopback/repository packageIssues related to @loopback/repository packagebug
Description
Steps to reproduce
Current Behavior
My Field configuration
@property({
type: 'string',
required: true,
jsonSchema: {
minLength: 2,
transform: ['trim'],
},
})
name: string;
this.repository.create({ name: ' ' }) = > This throw an error which is good
this.repository.updateById(id, { name: ' ' }) = > This function directly bypass the validation configured in model
Expected Behavior
this.repository.updateById(id, { name: ' ' }) = > This method call should throw an error based on model configuration.
Additional information
Commands
- node -e 'console.log(process.platform, process.arch, process.versions.node)'
- npm ls --prod --depth 0 | grep loopback
Output
- darwin x64 12.16.1
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── [email protected]
├── [email protected]
Related Issues
See Reporting Issues for more tips on writing good issues
Metadata
Metadata
Assignees
Labels
RepositoryIssues related to @loopback/repository packageIssues related to @loopback/repository packagebug