Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/new-join-steps/base-step.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class BaseStepComponent extends Component {
funFact: app.intro?.funFact || '',
}),
newStepFourData: (app) => ({
phoneNo: app.socialLink?.phoneNo || '',
phoneNumber: app.socialLink?.phoneNumber || '',
twitter: app.socialLink?.twitter || '',
linkedin: app.socialLink?.linkedin || '',
instagram: app.socialLink?.instagram || '',
Expand Down
8 changes: 4 additions & 4 deletions app/components/new-join-steps/new-step-four.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

<Reusables::InputBox
@field="Phone Number"
@name="phoneNo"
@name="phoneNumber"
@placeHolder="+91 80000 00000"
@type="tel"
@required={{true}}
@value={{this.data.phoneNo}}
@value={{this.data.phoneNumber}}
@onInput={{this.inputHandler}}
@variant="input--full-width"
/>
{{#if this.errorMessage.phoneNo}}
<div class="error__message">{{this.errorMessage.phoneNo}}</div>
{{#if this.errorMessage.phoneNumber}}
<div class="error__message">{{this.errorMessage.phoneNumber}}</div>
{{/if}}

<Reusables::InputBox
Expand Down
6 changes: 3 additions & 3 deletions app/components/new-join-steps/new-step-four.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class NewStepFourComponent extends BaseStepComponent {
}

stepValidation = {
phoneNo: NEW_STEP_LIMITS.stepFour.phoneNo,
phoneNumber: NEW_STEP_LIMITS.stepFour.phoneNumber,
twitter: NEW_STEP_LIMITS.stepFour.twitter,
linkedin: NEW_STEP_LIMITS.stepFour.linkedin,
instagram: NEW_STEP_LIMITS.stepFour.instagram,
Expand Down Expand Up @@ -61,7 +61,7 @@ export default class NewStepFourComponent extends BaseStepComponent {
}

validateField(field, value) {
if (field === 'phoneNo') {
if (field === 'phoneNumber') {
const trimmedValue = value?.trim() || '';
const isValid = trimmedValue && phoneNumberRegex.test(trimmedValue);
return {
Expand All @@ -73,7 +73,7 @@ export default class NewStepFourComponent extends BaseStepComponent {
}

formatError(field, result) {
if (field === 'phoneNo') {
if (field === 'phoneNumber') {
if (result.isValid) return '';
return 'Please enter a valid phone number (e.g., +91 80000 00000)';
}
Expand Down
2 changes: 1 addition & 1 deletion app/constants/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const mapSocialUrls = {
};

export const socialFields = [
'phoneNo',
'phoneNumber',
'twitter',
'linkedin',
'instagram',
Expand Down
2 changes: 1 addition & 1 deletion app/constants/new-join-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const NEW_STEP_LIMITS = {
funFact: { min: 100, max: 500 },
},
stepFour: {
phoneNo: { min: 1 },
phoneNumber: { min: 1 },
twitter: { min: 1 },
github: { min: 1 },
linkedin: { min: 1 },
Expand Down
2 changes: 1 addition & 1 deletion tests/constants/application-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const NEW_STEPS_APPLICATIONS_DATA = {
'I built my first website at age 12 and have been coding ever since.',
},
stepFour: {
phoneNo: '+1-699-969-6969',
phoneNumber: '+1-699-969-6969',
twitter: 'anujchhikara',
github: 'anujchhikara',
linkedin: 'anujchhikara',
Expand Down