How to validate common variables/fields from multiple objects in more generic way? The 2019...
How to manage monthly salary
How to notate time signature switching consistently every measure
Is three citations per paragraph excessive for undergraduate research paper?
Where to refill my bottle in India?
Is there any way to tell whether the shot is going to hit you or not?
Is "plugging out" electronic devices an American expression?
What do hard-Brexiteers want with respect to the Irish border?
Write faster on AT24C32
Should I use my personal e-mail address, or my workplace one, when registering to external websites for work purposes?
Resizing object distorts it (Illustrator CC 2018)
Can a flute soloist sit?
Is this app Icon Browser Safe/Legit?
What do the Banks children have against barley water?
How to type this arrow in math mode?
Can someone be penalized for an "unlawful" act if no penalty is specified?
Is there a symbol for a right arrow with a square in the middle?
I see my dog run
Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?
What does ひと匙 mean in this manga and has it been used colloquially?
Why isn't airport relocation done gradually?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
What does Linus Torvalds mean when he says that Git "never ever" tracks a file?
One word riddle: Vowel in the middle
Who coined the term "madman theory"?
How to validate common variables/fields from multiple objects in more generic way?
The 2019 Stack Overflow Developer Survey Results Are InMethod to lookup persistent entities by an example objectNull Object pattern with simple class hierarchyIs this the right way to retrieve all the fields from any Object?Listening to modifications on variablesIs there a more efficient way of executing multiple SQL prepared statements at once?Better way to deep copy than this? How can I make it generic by `Collection` type?Implementation of stackDeserializing a customly formatted stringTic Tac Toe in Java: Runner Class Design, Using Helper Methods, and Instance VariablesDynamically Generating XML Deserialization Classes / Code: Part I, Reading
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
$begingroup$
Can someone help me to create a generic method that validates common fields/variables comes from multiple objects, if that is possible?
The below code validates some bunch of variables/fields from a schema object, so here the requirement is I have two different schema objects which has common Fields/variables, Is it possible to validate these variables in more generic way, here is my code. Thank you!
public class RequestValidation {
public void validateRequest(EventRequest eventRequest) {
//FI Event
FIEventProcessorImpl fiEventProcessor = new FIEventProcessorImpl();
FIEventSchema fiEvent = fiEventProcessor.getFiEventSchema(eventRequest);
//Party data Validation
String partyFName = null;
String partyLName = null;
String partyEmail = null;
String partyId = null;
if (null != fiEvent.getParty()) {
partyId = fiEvent.getParty().getPartyId();
if (null != fiEvent.getParty().getPartyName()
&& null != fiEvent.getParty().getPartyName().getName()) {
partyFName = fiEvent.getParty().getPartyName().getName().getGivenName();
partyLName = fiEvent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = fiEvent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != fiEvent.getParty().getPartyEmail()) {
partyEmail = fiEvent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
String socialScore = null;
String clientFp = null;
if(null != fiEvent.getApplicationContext() && null != fiEvent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = fiEvent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
//ProfileChange Event
ProfileChangeProcessorImpl eventProcessor = new ProfileChangeProcessorImpl();
ProfileChangeBasicEventSchema profileChangeevent = eventProcessor.getProfileChangeEventSchema(eventRequest);
//Party data Validation
if (null != profileChangeevent.getParty()) {
partyId = profileChangeevent.getParty().getPartyId();
if (null != profileChangeevent.getParty().getPartyName()
&& null != profileChangeevent.getParty().getPartyName().getName()) {
partyFName = profileChangeevent.getParty().getPartyName().getName().getGivenName();
partyLName = profileChangeevent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = profileChangeevent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != profileChangeevent.getParty().getPartyEmail()) {
partyEmail = profileChangeevent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
if(null != profileChangeevent.getApplicationContext() && null != profileChangeevent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = profileChangeevent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
}
private String getContextValue(List<ContextItem> contextItems, String key) {
String value = null;
for(ContextItem contextItem : contextItems){
if(contextItem.getKey().equalsIgnoreCase(key)){
value = contextItem.getValue();
}
}
return value.toString();
}
private String getAdditionalProperty(Map<String, ?> map, String key) {
Object value = map.get(key);
return value == null ? null : value.toString();
}
}
java
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
Can someone help me to create a generic method that validates common fields/variables comes from multiple objects, if that is possible?
The below code validates some bunch of variables/fields from a schema object, so here the requirement is I have two different schema objects which has common Fields/variables, Is it possible to validate these variables in more generic way, here is my code. Thank you!
public class RequestValidation {
public void validateRequest(EventRequest eventRequest) {
//FI Event
FIEventProcessorImpl fiEventProcessor = new FIEventProcessorImpl();
FIEventSchema fiEvent = fiEventProcessor.getFiEventSchema(eventRequest);
//Party data Validation
String partyFName = null;
String partyLName = null;
String partyEmail = null;
String partyId = null;
if (null != fiEvent.getParty()) {
partyId = fiEvent.getParty().getPartyId();
if (null != fiEvent.getParty().getPartyName()
&& null != fiEvent.getParty().getPartyName().getName()) {
partyFName = fiEvent.getParty().getPartyName().getName().getGivenName();
partyLName = fiEvent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = fiEvent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != fiEvent.getParty().getPartyEmail()) {
partyEmail = fiEvent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
String socialScore = null;
String clientFp = null;
if(null != fiEvent.getApplicationContext() && null != fiEvent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = fiEvent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
//ProfileChange Event
ProfileChangeProcessorImpl eventProcessor = new ProfileChangeProcessorImpl();
ProfileChangeBasicEventSchema profileChangeevent = eventProcessor.getProfileChangeEventSchema(eventRequest);
//Party data Validation
if (null != profileChangeevent.getParty()) {
partyId = profileChangeevent.getParty().getPartyId();
if (null != profileChangeevent.getParty().getPartyName()
&& null != profileChangeevent.getParty().getPartyName().getName()) {
partyFName = profileChangeevent.getParty().getPartyName().getName().getGivenName();
partyLName = profileChangeevent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = profileChangeevent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != profileChangeevent.getParty().getPartyEmail()) {
partyEmail = profileChangeevent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
if(null != profileChangeevent.getApplicationContext() && null != profileChangeevent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = profileChangeevent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
}
private String getContextValue(List<ContextItem> contextItems, String key) {
String value = null;
for(ContextItem contextItem : contextItems){
if(contextItem.getKey().equalsIgnoreCase(key)){
value = contextItem.getValue();
}
}
return value.toString();
}
private String getAdditionalProperty(Map<String, ?> map, String key) {
Object value = map.get(key);
return value == null ? null : value.toString();
}
}
java
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
Can someone help me to create a generic method that validates common fields/variables comes from multiple objects, if that is possible?
The below code validates some bunch of variables/fields from a schema object, so here the requirement is I have two different schema objects which has common Fields/variables, Is it possible to validate these variables in more generic way, here is my code. Thank you!
public class RequestValidation {
public void validateRequest(EventRequest eventRequest) {
//FI Event
FIEventProcessorImpl fiEventProcessor = new FIEventProcessorImpl();
FIEventSchema fiEvent = fiEventProcessor.getFiEventSchema(eventRequest);
//Party data Validation
String partyFName = null;
String partyLName = null;
String partyEmail = null;
String partyId = null;
if (null != fiEvent.getParty()) {
partyId = fiEvent.getParty().getPartyId();
if (null != fiEvent.getParty().getPartyName()
&& null != fiEvent.getParty().getPartyName().getName()) {
partyFName = fiEvent.getParty().getPartyName().getName().getGivenName();
partyLName = fiEvent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = fiEvent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != fiEvent.getParty().getPartyEmail()) {
partyEmail = fiEvent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
String socialScore = null;
String clientFp = null;
if(null != fiEvent.getApplicationContext() && null != fiEvent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = fiEvent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
//ProfileChange Event
ProfileChangeProcessorImpl eventProcessor = new ProfileChangeProcessorImpl();
ProfileChangeBasicEventSchema profileChangeevent = eventProcessor.getProfileChangeEventSchema(eventRequest);
//Party data Validation
if (null != profileChangeevent.getParty()) {
partyId = profileChangeevent.getParty().getPartyId();
if (null != profileChangeevent.getParty().getPartyName()
&& null != profileChangeevent.getParty().getPartyName().getName()) {
partyFName = profileChangeevent.getParty().getPartyName().getName().getGivenName();
partyLName = profileChangeevent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = profileChangeevent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != profileChangeevent.getParty().getPartyEmail()) {
partyEmail = profileChangeevent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
if(null != profileChangeevent.getApplicationContext() && null != profileChangeevent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = profileChangeevent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
}
private String getContextValue(List<ContextItem> contextItems, String key) {
String value = null;
for(ContextItem contextItem : contextItems){
if(contextItem.getKey().equalsIgnoreCase(key)){
value = contextItem.getValue();
}
}
return value.toString();
}
private String getAdditionalProperty(Map<String, ?> map, String key) {
Object value = map.get(key);
return value == null ? null : value.toString();
}
}
java
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
Can someone help me to create a generic method that validates common fields/variables comes from multiple objects, if that is possible?
The below code validates some bunch of variables/fields from a schema object, so here the requirement is I have two different schema objects which has common Fields/variables, Is it possible to validate these variables in more generic way, here is my code. Thank you!
public class RequestValidation {
public void validateRequest(EventRequest eventRequest) {
//FI Event
FIEventProcessorImpl fiEventProcessor = new FIEventProcessorImpl();
FIEventSchema fiEvent = fiEventProcessor.getFiEventSchema(eventRequest);
//Party data Validation
String partyFName = null;
String partyLName = null;
String partyEmail = null;
String partyId = null;
if (null != fiEvent.getParty()) {
partyId = fiEvent.getParty().getPartyId();
if (null != fiEvent.getParty().getPartyName()
&& null != fiEvent.getParty().getPartyName().getName()) {
partyFName = fiEvent.getParty().getPartyName().getName().getGivenName();
partyLName = fiEvent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = fiEvent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != fiEvent.getParty().getPartyEmail()) {
partyEmail = fiEvent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
String socialScore = null;
String clientFp = null;
if(null != fiEvent.getApplicationContext() && null != fiEvent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = fiEvent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
//ProfileChange Event
ProfileChangeProcessorImpl eventProcessor = new ProfileChangeProcessorImpl();
ProfileChangeBasicEventSchema profileChangeevent = eventProcessor.getProfileChangeEventSchema(eventRequest);
//Party data Validation
if (null != profileChangeevent.getParty()) {
partyId = profileChangeevent.getParty().getPartyId();
if (null != profileChangeevent.getParty().getPartyName()
&& null != profileChangeevent.getParty().getPartyName().getName()) {
partyFName = profileChangeevent.getParty().getPartyName().getName().getGivenName();
partyLName = profileChangeevent.getParty().getPartyName().getName().getSurname();
if (null == partyFName && null == partyLName) {
Map<String, Object> nameMap = profileChangeevent.getParty().getPartyName().getName()
.getAdditionalProperties();
if (!nameMap.isEmpty()) {
partyFName = getAdditionalProperty(nameMap, "first_name");
partyLName = getAdditionalProperty(nameMap, "last_name");
}
}
}
if (null != profileChangeevent.getParty().getPartyEmail()) {
partyEmail = profileChangeevent.getParty().getPartyEmail().getEmailAddress();
if(null == partyEmail || partyEmail.isEmpty()){
//Logging missing field value logic
}
}
}
if (null == partyFName || partyFName.isEmpty() || null == partyLName || partyLName.isEmpty()
|| null == partyId || partyId.isEmpty()) {
//Logging missing field value logic
}
//Application Context data Validation
if(null != profileChangeevent.getApplicationContext() && null != profileChangeevent.getApplicationContext().getContextItems()){
List<ContextItem> contextItems = profileChangeevent.getApplicationContext().getContextItems();
if(null != contextItems && !contextItems.isEmpty()){
socialScore = getContextValue(contextItems, "SCORE");
clientFp = getContextValue(contextItems, "CLIENT_ID");
}
}
if (null == socialScore || socialScore.isEmpty() || null == clientFp || clientFp.isEmpty()) {
//Logging missing field value logic
}
}
private String getContextValue(List<ContextItem> contextItems, String key) {
String value = null;
for(ContextItem contextItem : contextItems){
if(contextItem.getKey().equalsIgnoreCase(key)){
value = contextItem.getValue();
}
}
return value.toString();
}
private String getAdditionalProperty(Map<String, ?> map, String key) {
Object value = map.get(key);
return value == null ? null : value.toString();
}
}
java
java
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 mins ago
Krishna KKrishna K
1
1
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Krishna K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "196"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Krishna K is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217233%2fhow-to-validate-common-variables-fields-from-multiple-objects-in-more-generic-wa%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Krishna K is a new contributor. Be nice, and check out our Code of Conduct.
Krishna K is a new contributor. Be nice, and check out our Code of Conduct.
Krishna K is a new contributor. Be nice, and check out our Code of Conduct.
Krishna K is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217233%2fhow-to-validate-common-variables-fields-from-multiple-objects-in-more-generic-wa%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown