I am facing this error "e_validation_failure: validation exception" only on prod enviroment... I am using Adonis 5, in my local everything runs correctly, in stage as well.
my controller looks like this:
public async store({ request, response }: HttpContextContract) {
response.header('Cache-Control', 'no-cache, no-store');
try {
const payload = await request.validate(SignupUserValidator);
await UserService.store(payload);
return responseWithSuccess(response);
} catch (error) {
return responseWithError(response, error.message);
}
}
my validator looks like this:
import { schema, rules } from '#ioc:Adonis/Core/Validator';
import { HttpContextContract } from '#ioc:Adonis/Core/HttpContext';
import { UserRoleEnum } from 'Contracts/enums';
export default class SignupUserValidator {
constructor(protected ctx: HttpContextContract) {}
public schema = schema.create({
first_name: schema.string({ trim: true }, [rules.minLength(2)]),
last_name: schema.string({ trim: true }, [rules.minLength(2)]),
password: schema.string({}, [rules.minLength(8), rules.confirmed()]),
email: schema.string({}, [
rules.email(),
rules.unique({ table: 'users', column: 'email' }),
]),
role: schema.enum([UserRoleEnum.CLIENT, UserRoleEnum.COWORKING] as const),
photo_id: schema.number.optional([rules.exists({ table: 'photos', column: 'id' })]),
personal_address: schema.object.optional().members({
fulltext: schema.string.optional({ trim: true }),
latitude: schema.number.optional(),
longitude: schema.number.optional(),
city: schema.string.optional(),
state: schema.string.optional(),
country: schema.string.optional({ trim: true }),
}),
personal_phone: schema.string({}, [rules.maxLength(14), rules.minLength(10)]),
cowork: schema.object
.optional([rules.requiredWhen('role', '=', UserRoleEnum.COWORKING)])
.members({
name: schema.string({ trim: true }),
email: schema.string.optional({}, [
rules.email(),
rules.unique({ table: 'cowork_accounts', column: 'email' }),
]),
phone: schema.string.optional({}, [rules.maxLength(14), rules.minLength(10)]),
photo_id: schema.number.optional([
rules.exists({ table: 'photos', column: 'id' }),
]),
}),
client: schema.object
.optional([rules.requiredWhen('role', '=', UserRoleEnum.CLIENT)])
.members({
company_name: schema.string.optional({ trim: true }),
company_email: schema.string.optional({}, [rules.email()]),
company_phone: schema.string.optional({}, [
rules.maxLength(14),
rules.minLength(10),
]),
company_address: schema.object.optional().members({
fulltext: schema.string.optional({ trim: true }),
latitude: schema.number.optional(),
longitude: schema.number.optional(),
country: schema.string.optional({ trim: true }),
}),
company_photo_id: schema.number.optional([
rules.exists({ table: 'photos', column: 'id' }),
]),
}),
});
public messages = {
minLength: 'The {{ field }} must be at least {{ options.minLength }} characters',
maxLength: 'The {{ field }} must have at most {{ options.maxLength }} characters',
required: 'The {{ field }} is required',
exists: 'The {{ field }} is invalid',
number: 'The {{ field }} must be a number',
string: 'The {{ string }} must be a string',
'password_confirmation.confirmed': 'The passwords are different',
'email.email': 'The email is not valid',
'email.unique': 'User with email address already exists',
'cowork.requiredWhen': 'The cowork object must be sent when the user is a coworking',
'cowork.email.email': 'The email is not valid',
'cowork.email.unique': 'Company with email address already exists',
'client.requiredWhen': 'The client object must be sent when the user is a client',
};
My request looks like this:
{
"first_name": "Dan",
"last_name": "Abreu",
"password": "secret1233",
"password_confirmation": "secret1233",
"email": "test#gmail.com",
"role": "CLIENT",
"personal_phone": "1234567890",
"photo_id": null,
"personal_address": {
"fulltext": "Rua do Lead",
"city":"Gravatá",
"state":"Pe",
"country":"Brazil",
"longitude": -10.00,
"latitude": 1.00
},
"client": {
"company_name": "my company",
"company_email": "test1#gmail.com",
"company_phone": "10800-0000",
"company_photo_id": null,
"company_address": {
"fulltext": "Rua do labrador",
"longitude": -10.00,
"latitude": 1.00
}
}
I am following the rules when creating the validator:
node ace make:validator SignupUserValidator
is anyone facing the same issue on aws ec2 enviroment?
I tried to validate the request with the validator I created and everything works fine on my local and stage env but on prod it does not work.
Related
I working on NodeJS backend API and trying to change a key in an array of objects from false to true in my MongoDB database. I am passing two conditions from the client: the email of the user and the email of the person that sent the user a message. I would like to change the boolean value of read to true.
Sample data:
{
_id: new ObjectId("6282163781acbcd969de3fc9"),
firstName: 'Amanda',
lastName: 'Nwadukwe',
role: 'Volunteer',
email: 'amandanwadukwe#gmail.com',
password: '$2a$10$YD5MQlMt0gqSULQOBNcEfOLr3vIK8eF4dqdLw3XctsIVgbnf54P32',
confirmPassword: '$2a$10$mnL0S1bDDkGVnKgqQP81mOew9aFdNTUCGOEs7LvWYRxzivN4hrtFS',
date: 2022-05-16T09:14:57.000Z,
messages: [
{
message: 'This is another message from Amanda',
sendersEmail: 'laju#gmail.com',
date: '2022-05-14T12:00:45.000Z',
read: false
},
{
sender: 'Amanda Nwadukwe',
message: 'This is another message from Amanda',
sendersEmail: 'amanda#gmail.com',
date: '2022-05-14T12:00:45.000Z',
read: false
}]
Desired Output:
{
_id: new ObjectId("6282163781acbcd969de3fc9"),
firstName: 'Amanda',
lastName: 'Nwadukwe',
role: 'Volunteer',
email: 'amandanwadukwe#gmail.com',
password: '$2a$10$YD5MQlMt0gqSULQOBNcEfOLr3vIK8eF4dqdLw3XctsIVgbnf54P32',
confirmPassword: '$2a$10$mnL0S1bDDkGVnKgqQP81mOew9aFdNTUCGOEs7LvWYRxzivN4hrtFS',
date: 2022-05-16T09:14:57.000Z,
messages: [
{
message: 'This is another message from Amanda',
sendersEmail: 'laju#gmail.com',
date: '2022-05-14T12:00:45.000Z',
read: true
},
{
sender: 'Amanda Nwadukwe',
message: 'This is another message from Amanda',
sendersEmail: 'amanda#gmail.com',
date: '2022-05-14T12:00:45.000Z',
read: false
}]
I am tried a lot of things with filtering but I have not been successful. Here is my code to change all the read to true. It is also not working.
app.post("/view_message", (req, res) => {
const email = req.body.email;
Users.findOneAndUpdate({ "email": email }, {$set:{"messages.$.read": true}}, (err, result) => {
console.log(result)
})
});
You missed to add a check to match the array element to be updated.
Playground
db.collection.update({
"email": "amandanwadukwe#gmail.com",
"messages.sendersEmail": "laju#gmail.com", //This did the trick
},
{
"$set": {
"messages.$.read": true
}
},
{
"multi": false,
"upsert": false
})
Just in case anyone needs it, to update all the read values for all objects in the array I used this:
User.findAndUpdateOne({
"email": "amandanwadukwe#gmail.com",
"messages.sendersEmail": "laju#gmail.com",
},
{
"$set": {
"messages.$[].read": true //Added square brackets
}
},
{
"multi": false,
"upsert": false
})
When I try to set up a test, Stripe connect account on the backend and skip onboarding, I run into address and identity verification issues. How can I resolve these?
Background: for testing backend features other than Stripe onboarding, it would be helpful to set up a test Stripe connect account that has completed onboarding. There are other answers here indicating that there is no one-call process to complete that, but it's not clear exactly what the steps are.
Below I try to complete this in 3 steps; but I am running into an issue: the address is unverified even though I'm using the address 'token' that the documentation says will automatically verify.
My steps:
Create an account token
Create a bank_account token
Create an account, using those tokens
Result: when I check the account after a few seconds (I wait 10 seconds for verification) I get:
account.payouts_enabled: true
account.charges_enabled: true
account.currently_due: [
"individual.address.line1"
]
account.past_due: []
account.eventually_due: []
account.disabled_reason: requirements.pending_verification
account.pending_verification: [
'individual.address.city',
'individual.address.line1',
'individual.address.postal_code',
'individual.address.state',
'individual.id_number'
]
The problem: why is the address line marked "currently_due" (when I'm using the documented token "address_full_match") and address verification incomplete? Additionally, why is the individual.id_number pending verification (when I'm using the documented token "222222222")?
Code below, using the Stripe Node API:
const accountToken = await stripe.tokens.create({
account: {
business_type: 'individual',
individual: {
first_name: 'Jenny',
last_name: 'Rosen',
// https://stripe.com/docs/connect/testing
// Use these addresses for line1 to trigger certain verification conditions. You must pass in legitimate values for the city, state, and postal_code arguments.
// address_full_match Successful verification.
// address_no_match Unsuccessful verification.
address: {
line1: 'address_full_match',
city: 'Columbus',
state: 'OH',
postal_code: '43214',
// country: 'US'
},
// https://stripe.com/docs/connect/testing#test-dobs
// 1901-01-01 Successful verification. Any other DOB results in unsuccessful verification.
// 1902-01-01 Successful, immediate verification. The verification result is returned directly in the response, not as part of a webhook event.
// 1900-01-01 This DOB will trigger an Office of Foreign Assets Control (OFAC) alert.
dob: {
day: 1,
month: 1,
year: 1902
},
// https://stripe.com/docs/connect/testing
// Use these personal ID numbers for individual[id_number] or the id_number attribute on the Person object to trigger certain verification conditions.
// 000000000 Successful verification. 0000 also works for SSN last 4 verification.
// 111111111 Unsuccessful verification (identity mismatch).
// 222222222 Successful, immediate verification. The verification result is returned directly in the response, not as part of a webhook event.
id_number: '222222222',
// ssn_last_4: '0000',
email: 'jenny.rosen#example.com',
phone: '000 000 0000'
},
tos_shown_and_accepted: true,
},
});
const bankAccountToken = await stripe.tokens.create({
bank_account: {
country: 'US',
currency: 'usd',
account_holder_name: 'Jenny Rosen',
account_holder_type: 'individual',
routing_number: '110000000',
account_number: '000123456789',
},
});
const account = await stripe.accounts.create({
type: 'custom',
country: 'US',
business_profile: {
mcc: '5734', // Merchant Category Code. 5734 = Computer Software Stores
product_description: 'Cool Beans, Inc',
},
external_account: bankAccountToken.id,
capabilities: {
card_payments: {
requested: true,
},
transfers: {
requested: true,
},
},
account_token: accountToken.id,
});
Here's the config that works for me:
async function createTestStripeAccount() {
return await stripe.accounts.create({
type: 'custom',
country: 'US',
capabilities: {
card_payments: { requested: true },
transfers: { requested: true }
},
business_type: 'individual',
external_account: {
object: 'bank_account',
country: 'US',
currency: 'usd',
routing_number: '110000000',
account_number: '000123456789'
},
tos_acceptance: { date: 1609798905, ip: '8.8.8.8' },
business_profile: { mcc: 5045, url: 'https://bestcookieco.com' },
individual: {
first_name: 'Test',
last_name: 'User',
phone: '+16505551234',
email: 'test#example.com',
id_number: '222222222',
address: {
line1: '123 State St',
city: 'Schenectady',
postal_code: '12345',
state: 'NY'
},
dob: {
day: 10,
month: 11,
year: 1980
}
}
})
}
I've managed to set it up today for my client in sandbox and production.
PHP version with using the official library SDK from stripe.
composer require stripe/stripe-php
At the time of this writing the above version of stripe/stripe-php is exactly v9.6.0
<?php
\Stripe\Stripe::setApiKey('yourSandbox-STRIPE_SECRET_KEY-Here');
\Stripe\Account::create([
"type" => "custom",
"country" => "GB",
"capabilities" => [
"card_payments" => [
"requested" => true,
],
"transfers" => [
"requested" => true,
],
],
"business_type" => "individual",
"external_account" => [
"object" => "bank_account",
"country" => "GB",
"currency" => "gbp",
"account_number" => "00012345",
],
'tos_acceptance' => ['date' => 1609798905, 'ip' => '8.8.8.8'],
"business_profile" => [
"mcc" => 5045,
"url" => "https://exmple.com",
],
"individual" => [
"first_name" => "Test",
"last_name" => "User",
"phone" => "+16505551234",
"email" => "test#example.com",
"id_number" => "222222222",
"address" => [
"line1" => "123 State St",
"city" => "London",
"postal_code" => "TF5 0DL",
],
"dob" => [
"day" => 01,
"month" => 01,
"year" => 1901,
],
],
]);
I hope it will help somebody to save some time. Cheers and good luck.
References:
https://stripe.com/docs/connect/custom-accounts#create
https://stripe.com/docs/connect/testing#identity-and-address-verification
https://stripe.com/docs/connect/updating-accounts
You have to add document field as well for upload document to make the account active for testing purpose.
const account = await stripe.accounts.create({
type: "custom",
country: "US",
capabilities: {
card_payments: { requested: true },
transfers: { requested: true },
},
business_type: "individual",
external_account: {
object: "bank_account",
country: "US",
currency: "usd",
routing_number: "110000000",
account_number: "000123456789",
},
tos_acceptance: { date: new Date(), ip: "8.8.8.8" },
business_profile: { mcc: 5045, url: "https://bestcookieco.com" },
individual: {
first_name: "custom_user",
last_name: "one",
phone: "+16505551234",
email: "custom_user1#yopmail.com",
id_number: "222222222",
address: {
line1: "address_full_match",
city: "Schenectady",
postal_code: "12345",
state: "NY",
},
dob: {
day: 01,
month: 01,
year: 1901,
},
verification: {
document: {
front: "file_identity_document_success",
},
},
},
});
I am trying to do something similar to the example shown here: https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/
with Node.js and the standard MongoDB driver (I'm not using Mongoose).
I've tried changing the validationAction to warm and the validationLevel to off but even then I still get the same error.
I am assuming I messed up something with the syntax, below is my code
// Database Name
const dbName = 'testproject';
// Connection URL
const url = `mongodb://localhost:27017/${dbName}`;
function createStudents(db) {
db.createCollection("students", {
validator: {
$jsonSchema: {
bsonType: "object",
required: [ "name", "year", "major", "address.city", "address.street" ],
properties: {
name: {
bsonType: "string",
description: "must be a string and is required"
},
gender: {
bsonType: "string",
description: "must be a string and is not required"
},
year: {
bsonType: "int",
minimum: 2017,
maximum: 3017,
exclusiveMaximum: false,
description: "must be an integer in [ 2017, 3017 ] and is required"
},
major: {
enum: [ "Math", "English", "Computer Science", "History", null ],
description: "can only be one of the enum values and is required"
},
"address.city" : {
bsonType: "string",
description: "must be a string and is required"
},
"address.street" : {
bsonType: "string",
description: "must be a string and is required"
}
}
}
}
})
}
async function insertStudent(db){
await db.collection('students').insertOne({
name: "Alice",
year: 2019,
major: "History",
address: {
city: "NYC",
street: "33rd Street"
}
}).catch(e => console.log(e))
}
// Use connect method to connect to the server
async function connect () {
//Connect to the client
const client = await MongoClient.connect(url, { useNewUrlParser: true }).catch(e => {throw new Error(400)})
const db = client.db(dbName)
//Create the students collection
createStudents(db);
//Insert a Student
await insertStudent(db)
const cursor = await db.collection('students').find({}).toArray();
console.log(cursor)
}
connect();
Cursor is always empty, so no documents gets added to the collection.
The errors I get are the followings:
at Function.create (/Users/myuser/projects/Javascript/mongotest/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:43:12)
at toError (/Users/myuser/projects/Javascript/mongotest/node_modules/mongodb/lib/utils.js:149:22)
at coll.s.topology.insert (/Users/myuser/projects/Javascript/mongotest/node_modules/mongodb/lib/operations/collection_ops.js:848:39)
at /Users/myuser/projects/Javascript/mongotest/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:532:18
at process._tickCallback (internal/process/next_tick.js:61:11)
driver: true,
name: 'MongoError',
index: 0,
code: 121,
errmsg: 'Document failed validation',
[Symbol(mongoErrorContextSymbol)]: {} }
I have a question regarding Export to Excel in free-jqgrid 4.15.4. I want to know how to use this resultset {"groupOp":"AND","rules":[{"field":"FirstName","op":"eq","data":"Amit"}]} into my Business Logic Method.
Just for more clarification, I've using OfficeOpenXml and if I don't use filtered resultset(aforementioned) it is working fine and I'm able to download file with full records in an excel sheet. But I'm not sure what to do or how to utilize the resultset {"groupOp":"AND","rules":[{"field":"FirstName","op":"eq","data":"Amit"}]}
If required I can share my controller and BL code.
I have added a fiddle which shows implementation of Export to Excel button in jqGrid pager.
Before coming to here, I've read and tried to understand from following questions:
1] jqgrid, export to excel (with current filter post data) in an asp.net-mvc site
2] Export jqgrid filtered data as excel or CSV
Here is the code :
$(function () {
"use strict";
var mydata = [
{ id: "10", FirstName: "test", LastName: "TNT", Gender: "Male" },
{ id: "11", FirstName: "test2", LastName: "ADXC", Gender: "Male" },
{ id: "12", FirstName: "test3", LastName: "SDR", Gender: "Female" },
{ id: "13", FirstName: "test4", LastName: "234", Gender: "Male" },
{ id: "14", FirstName: "test5", LastName: "DAS", Gender: "Male" },
];
$("#list").jqGrid({
data: mydata,
colNames: ['Id', 'First Name', 'Last Name', 'Gender'],
colModel: [
{
label: "Id",
name: 'Id',
hidden: true,
search: false,
},
{
label: "FirstName",
name: 'FirstName',
searchoptions: {
searchOperators: true,
sopt: ['eq', 'ne', 'lt', 'le','ni', 'ew', 'en', 'cn', 'nc'],
}, search: true,
},
{
label: "LastName",
name: 'LastName',
searchoptions: {
searchOperators: true,
sopt: ['eq', 'ne', 'lt', 'ni', 'ew', 'en', 'cn', 'nc'],
}, search: true,
},
{
label: "Gender",
name: 'Gender',
search: true, edittype: 'select', editoptions: { value: 'Male:Male;Female:Female' }, stype: 'select',
},
],
onSelectRow: function (id) {
if (id && id !== lastsel) {
jQuery('#list').restoreRow(lastsel);
jQuery('#list').editRow(id, true);
lastsel = id;
}
},
loadComplete: function (id) {
if ($('#list').getGridParam('records') === 0) {
//$('#grid tbody').html("<div style='padding:6px;background:#D8D8D8;'>No records found</div>");
}
else {
var lastsel = 0;
if (id && id !== lastsel) {
jQuery('#list').restoreRow(lastsel);
jQuery('#list').editRow(id, true);
lastsel = id;
}
}
},
loadonce: true,
viewrecords: true,
gridview: true,
width: 'auto',
height: '150px',
emptyrecords: "No records to display",
iconSet:'fontAwesome',
pager: true,
jsonReader:
{
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: false,
Id: "Id"
},
});
jQuery("#list").jqGrid("navButtonAdd", {
caption: "",
buttonicon: "fa-table",
title: "Export To Excel",
onClickButton: function (e) {
var projectId = null;
var isFilterAreUsed = $('#grid').jqGrid('getGridParam', 'search'),
filters = $('#grid').jqGrid('getGridParam', 'postData').filters;
var Urls = "/UsersView/ExportToExcel_xlsxFormat?filters="+ encodeURIComponent(filters); //' + encodeURIComponent(filters);/
if (totalRecordsCount > 0) {
$.ajax({
url: Urls,
type: "POST",
//contentType: "application/json; charset=utf-8",
data: { "searchcriteria": filters, "projectId": projectId, "PageName": "MajorsView" },
//datatype: "json",
success: function (data) {
if (true) {
window.location = '/UsersView/SentFiletoClientMachine?file=' + data.filename;
}
else {
$("#resultDiv").html(data.errorMessage);
$("#resultDiv").addClass("text-danger");
}
},
error: function (ex) {
common.handleAjaxError(ex.status);
}
});
}
else {
bootbox.alert("There are no rows to export in the Participant List")
if (dialog) {
dialog.modal('hide');
}
}
}
});
});
https://jsfiddle.net/ap43xecs/10/
There are exist many option to solve the problem. The simplest one consist of sending ids of filtered rows to the server instead of sending filters parameter. Free jqGrid supports lastSelectedData parameter and thus you can use $('#grid').jqGrid('getGridParam', 'lastSelectedData') to get the array with items sorted and filtered corresponds to the current filter and sorting criteria. Every item of the returned array should contain Id property (or id property) which you can use on the server side to filter the data before exporting.
The second option would be to implement server side filtering based on the filters parameter, which you send currently to the server. The old answer (see FilterObjectSet) provides an example of filtering in case of usage Entity Framework. By the way, the answer and another one contain code, which I used for exporting grid data to Excel using Open XML SDK. You can compare it with your existing code.
In some situations it could be interesting to export grid data to Excel without writing any server code. The corresponding demo could be found in the issue and UPDATED part of the answer.
I have two angular services that perform CRUD operations for different, but similar data objects. (Insider, outsider).
I'm trying to POST the data to the database with this code:
public postOutsider(out: Outsider){
console.log(out);
let fullUrl = `http://localhost:3002/api/outsiders`;
let headers = new Headers({'Content-Type':'applicaion/json'});
let options = new RequestOptions({headers: headers});
return this.h.post(fullUrl,out, options)
.map(this.extractData)
.catch(this.handleError)
.subscribe(res => {
let not: Notification = new Notification();
//sends the update to the notification service...
not.message = 'Succussfully Saved Outsider';
not.timeStamp = new Date(Date.now());
not.response = res;
this.saveStatus.next(not);
});
}
here is the backend code that processes the request:
create(req,res){
log.info(req.body);
return Outsider
.create({
firstName: req.body.firstName,
preferredName: req.body.preferredName,
middleName: req.body.middleName,
lastName: req.body.lastName,
address1: req.body.address1,
address2: req.body.address2,
city:req.body.city,
state:req.body.state,
zip:req.body.zip,
country: req.body.country,
currentContacts: req.body.currentContacts,
maxContacts:req.body.maxContacts,
expirationDate: req.body.expirationDate,
areaCode: req.body.areaCode,
language: req.body.language,
emailAddress: req.body.emailAddress,
gender: req.body.gender
})
.then(outsider => {
log.info({createdOutsider: outsider});
res.status(201).send(outsider);
})
.catch(err => res.status(400).send(err));
}
The other object sends the data in the same manner. The back end code is operating in the same manner. The angular service is defined like this:
public postInsider(ins: Insider) {
console.log(ins);
let fullUrl = `http://localhost:3002/api/insiders`;
let headers = new Headers({'Content-Type': 'application/json'});
let options = new RequestOptions({headers: headers});
return this.h.post(fullUrl, ins, options)
.map(this.extractData)
.catch(this.handleError)
.subscribe(res => {
let not: Notification = new Notification();
not.message = 'Successfully Saved Insider.';
not.timeStamp = new Date(Date.now());
not.response = res;
this.saveStatus.next(not);
});
}
And the backend counterpart for that code.
create(req, res) {
console.dir(req.body);
return Insider
.create({
firstName: req.body.firstName,
preferredName: req.body.preferredName,
middleName: req.body.middleName,
lastName: req.body.lastName,
address1: req.body.address1,
address2: req.body.address2,
city: req.body.city,
state: req.body.state,
zip: req.body.zip,
maxContacts: req.body.maxContacts,
currentContacts: req.body.currentContacts,
releaseDate: req.body.releaseDate,
gender: req.body.gender,
areaCode: req.body.areaCode,
language: req.body.language,
institutionId: req.body.institutionId,
country: req.body.country
})
.then(insider => {
log.info({
createdInsider: insider
});
res.status(201).send(insider);
})
.catch(err => {
log.error({
createInsiderError: err
});
res.status(400).send(err);
});
}
I do have a middleware in place that detects the body, and logs it out for troubleshooting, but it appears to be empty from the Outsider call.
The error I get back to the Angular app is as follows:
errors : [{message: "Outsider.firstName cannot be null", type:
"notNull Violation", path: "firstName",…},…] 0 : {message:
"Outsider.firstName cannot be null", type: "notNull Violation", path:
"firstName",…} 1 : {message: "Outsider.lastName cannot be null", type:
"notNull Violation", path: "lastName", value: null,…} 2 : {message:
"Outsider.address1 cannot be null", type: "notNull Violation", path:
"address1", value: null,…} 3 : {message: "Outsider.city cannot be
null", type: "notNull Violation", path: "city", value: null,…} 4 :
{message: "Outsider.state cannot be null", type: "notNull Violation",
path: "state", value: null,…} 5 : {message: "Outsider.zip cannot be
null", type: "notNull Violation", path: "zip", value: null,…} 6 :
{message: "Outsider.country cannot be null", type: "notNull
Violation", path: "country", value: null,…} 7 : {message:
"Outsider.expirationDate cannot be null", type: "notNull Violation",
path: "expirationDate",…} 8 : {message: "Outsider.areaCode cannot be
null", type: "notNull Violation", path: "areaCode", value: null,…}
Why are these behaving differently?