/    Sign up×
Community /Pin to ProfileBookmark

newbie need help with validating forms

NOTE: I am a complete beginer i’ve been trying to learn javascript and am finding it very tough. What i want to ddo with the following code is just to get the email, postal code and the phone number fields validated, so if nothing is put in the field, or if the incorrect information isnt entered then a alert box will appear, now i’ve already got the email part working but i am totally clueless as how to write the next bit, i’ve put it as another script and i’m not sure if this is right, can someone tell me what i’m doing wrong here and guide me? like i said i am a completely new to this so go easy with me ?

[CODE]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
“http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>

<meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1″>
<title>A&amp;B: Order a Pan (Sample Order Form)</title>
<link rel=”stylesheet” href=”styles/site.css” type=”text/css”>

<script language=”JavaScript” type=”text/javascript” src=”rollover.js”> </script>
<script language=”javascript” type=”text/javascript”>
re = /^w+([.-]?w+)*@w+([.-]?w+)(.w{2,3})+$/
function submitit(myform)
{
if(re.test(myform.emailaddr.value)){
return true
}
alert(“invalid email address”)
myform.emailaddr.focus()
myform.emailaddr.select()
return false
}
</script>

<script language=”javascript” type=”text/javascript”>
re = /^(?(d{3}))?[.-/]?(d{3})[.-/]?(d{4})$/

function submitit(myform){
validPhone = re.exec(myform.phone.value)

if(validPhone) {
myform.phone.value = “(” + validPhone[1] + “)” + validPhone[2] + “-” + validPhone[3]
}
else {
alert(myform.phone.value + ” isn’t a valid phone number”)
myform.phone.focus()
my.phone.select()
return false
}

//End hiding script –>

</script>

</head>

<body>

<!– Page-wide header –>
<div id=”header”>
<h1>Welcome to A &amp; B<br>
Pots and Pans Ltd.</h1>
</div>

<!– Leftmost column contents –>
<div id=”left”>
<h2>Visit:</h2>
<ul class=”navlist”>
<li><a href=”index.htm” onMouseOver=”change_it(‘pic1’)” onMouseOut=”change_back(‘pic1’)”>
<img src=”home_hov.gif” name=”pic1″ id=”pic1″ border=”0″></a></li>

<li><a href=”main.htm” onMouseOver=”change_it(‘pic2’)” onMouseOut=”change_back(‘pic2’)”>
<img src=”intro_hov.gif” name=”pic2″ id=”pic2″ border=”0″></a></li>

<li><a href=”product1.htm” onMouseOver=”change_it(‘pic3’)” onMouseOut=”change_back(‘pic3’)”>
<img src=”pans_hov.gif” name=”pic3″ id=”pic3″ border=”0″></a></li>

<li><a href=”form.htm” onMouseOver=”change_it(‘pic4’)” onMouseOut=”change_back(‘pic4’)”>
<img src=”form_hov.gif” name=”pic4″ id=”pic4″ border=”0″></a></li>

<li><a href=”wishlist.htm” onMouseOver=”change_it(‘pic5’)” onMouseOut=”change_back(‘pic5’)”>
<img src=”wishlist_hov.gif” name=”pic5″ id=”pic5″ border=”0″></a></li>

<li><a href=”code.htm” onMouseOver=”change_it(‘pic6’)” onMouseOut=”change_back(‘pic6’)”>
<img src=”code_hov.gif” name=”pic6″ id=”pic6″ border=”0″></a></li>
</ul>
</div>

<!– Middle (main) column contents –>
<div id=”middle”>
<h2>Sample Order Information Form</h2>
<form onsubmit= “return submitit(this)” name=”myform” action=”somesite.cfm”>

<table cellpadding=”5″>
<tr>
<td><h3>Shipping Information</h3></td>
<td>&nbsp;</td>
</tr>
<tr>
<td><label for=”shipFirstName”>First Name</label></td>
<td><input type=”text” name=”shipFirstName” id=”shipFirstName” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”shipFamilyName”>Family Name</label></td>
<td><input type=”text” name=”shipFamilyName” id=”shipFamilyName” maxlength=”30″></td>
</tr>
<tr>

<td><label for=”phone”>Contact Telephone Number</label></td>
<td><input type=”text” name=”phone” id=”phone” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”shipHouseNumber”>House Number</label></td>
<td><input type=”text” name=”shipHouseNumber” id=”shipHouseNumber” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”shipStreetName”>Street Name</label></td>
<td><input type=”text” name=”shipStreetName” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”shipCity”>City</label></td>
<td><input type=”text” name=”shipCity” id=”shipCity” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”shipPostalCode”>Postal Code</label></td>
<td><input type=”text” name=”shipPostalCode” id=”shipPostalCode” maxlength=”30″></td>
</tr>

<tr>
<td><h3>Billing Information</h3></td>
<td>&nbsp;</td>
</tr>
<tr>
<td><label for=”billFirstName”>First Name</label></td>
<td><input type=”text” name=”billFirstName” id=”billFirstName” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”billFamilyName”>Family Name</label></td>
<td><input type=”text” name=”billFamilyName” id=”billFamilyName” maxlength=”30″></td>
</tr>
<tr>

<td><label for=”emailaddr”>Email Address</label></td>
<td><input type=”text” name=”emailaddr” id=”emailaddr” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”phone”>Contact Telephone Number</label></td>
<td><input type=”text” name=”phone” id=”phone” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”billCardNumber”>Credit Card Number</label></td>
<td><input type=”text” name=”billCardNumber” id=”billCardNumber” maxlength=”30″></td>
</tr>
<tr>
<td><label for=”billCardType”>Credit Card Type</label></td>
<td><input type=”text” name=”billCardType” id=”billCardType” maxlength=”30″>Visa/MasterCard</td>
</tr>
<tr>
<td><label for=”instructions”>Special Instructions</label></td>
<td>
<textarea name=”instructions” id=”instructions” rows=”8″ cols=”30″>Enter your requirements here or comments.</textarea></td>
</tr>
<tr>
<td><input type=”submit” name=”Submit” id=”Submit” value=”Submit”></td>
<td>&nbsp;</td>
</tr>
</table>
</form>

</div>

<!– Rightmost column contents –>
<div id=”right”>
<h2>Your cart:</h2>
<div class=”cartitems” id=”itemlist”>
<p>No items</p>
</div>
</div>

<!– Page-wide footer –>
<div id=”footer”>
<p>&copy;2007 A&amp;B Ltd.</p>
</div>

</body>
</html>
[/CODE]

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@PadonakApr 25.2007 — take a look at this thread http://www.webdeveloper.com/forum/showthread.php?t=146153 i've just done the same validation for the author. if this will not be enough or some questions my email is below.
Copy linkTweet thisAlerts:
@nicola13authorApr 25.2007 — how would it work for the phone number and postal code fields? i'm being really stupid i know...
Copy linkTweet thisAlerts:
@PadonakApr 25.2007 — ok ic ;-) you are not stupid do not say such things buddy. i'll make your page and then put it here. just tell me phone number format and postal code format. sometimes postal code format can be very strange (for ex. canadian).
Copy linkTweet thisAlerts:
@nicola13authorApr 25.2007 — aww thank you ? ok phone number has to be about 11 didgets max, uhm post code has to be a UK post code eg: SW19 1AA or something ? thank you for helping me!! x
Copy linkTweet thisAlerts:
@PadonakApr 25.2007 — SW19 1AA - is it always space between two groups?

SW19 - are the letters always in Upper case? is it always 2 digits after these letters or it may be 1 digit?

1AA - is it always 1 digit before the letters or it may be 2 digits? are the letters always in Upper case?

im from russia we have another postal code format thats why im sking all this info
Copy linkTweet thisAlerts:
@nicola13authorApr 25.2007 — yeah there's always a space between the two groups and all letters are uppercase, two numbers after is correct too ?
Copy linkTweet thisAlerts:
@PadonakApr 25.2007 — ok. i'll put the code here later
Copy linkTweet thisAlerts:
@nicola13authorApr 25.2007 — thank you so so so much!!! x
Copy linkTweet thisAlerts:
@PadonakApr 25.2007 — here is the code:

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;
&lt;head&gt;

<i> </i>&lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-1"&gt;
<i> </i>&lt;title&gt;A&amp;amp;B: Order a Pan (Sample Order Form)&lt;/title&gt;
<i> </i>&lt;link rel="stylesheet" href="styles/site.css" type="text/css"&gt;

&lt;!--script language="JavaScript" type="text/javascript" src="rollover.js"&gt; &lt;/script--&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;!-- Page-wide header --&gt;
&lt;div id="header"&gt;
&lt;h1&gt;Welcome to A &amp;amp; B&lt;br&gt;
Pots and Pans Ltd.&lt;/h1&gt;
&lt;/div&gt;


&lt;!-- Leftmost column contents --&gt;
&lt;div id="left"&gt;
&lt;h2&gt;Visit:&lt;/h2&gt;
&lt;ul class="navlist"&gt;
&lt;li&gt;&lt;a href="index.htm" onMouseOver="change_it('pic1')" onMouseOut="change_back('pic1')"&gt;
&lt;img src="home_hov.gif" name="pic1" id="pic1" border="0" alt=""&gt;&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="main.htm" onMouseOver="change_it('pic2')" onMouseOut="change_back('pic2')"&gt;
&lt;img src="intro_hov.gif" name="pic2" id="pic2" border="0" alt=""&gt;&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="product1.htm" onMouseOver="change_it('pic3')" onMouseOut="change_back('pic3')"&gt;
&lt;img src="pans_hov.gif" name="pic3" id="pic3" border="0" alt=""&gt;&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="form.htm" onMouseOver="change_it('pic4')" onMouseOut="change_back('pic4')"&gt;
&lt;img src="form_hov.gif" name="pic4" id="pic4" border="0" alt=""&gt;&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="wishlist.htm" onMouseOver="change_it('pic5')" onMouseOut="change_back('pic5')"&gt;
&lt;img src="wishlist_hov.gif" name="pic5" id="pic5" border="0" alt=""&gt;&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="code.htm" onMouseOver="change_it('pic6')" onMouseOut="change_back('pic6')"&gt;
&lt;img src="code_hov.gif" name="pic6" id="pic6" border="0" alt=""&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;


&lt;!-- Middle (main) column contents --&gt;
&lt;div id="middle"&gt;
&lt;h2&gt;Sample Order Information Form&lt;/h2&gt;
&lt;form name="orderform" action="somesite.cfm"&gt;

<i> </i> &lt;table cellpadding="5"&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;h3&gt;Shipping Information&lt;/h3&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&amp;nbsp;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="shipFirstName"&gt;First Name&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="shipFirstName" id="shipFirstName" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="shipFamilyName"&gt;Family Name&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="shipFamilyName" id="shipFamilyName" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;

<i> </i> &lt;td&gt;&lt;label for="ship_phone"&gt;Contact Telephone Number&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="ship_phone" id="ship_phone" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="shipHouseNumber"&gt;House Number&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="shipHouseNumber" id="shipHouseNumber" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="shipStreetName"&gt;Street Name&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="shipStreetName" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="shipCity"&gt;City&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="shipCity" id="shipCity" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="shipPostalCode"&gt;Postal Code&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="shipPostalCode" id="shipPostalCode" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;


<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;h3&gt;Billing Information&lt;/h3&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&amp;nbsp;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="billFirstName"&gt;First Name&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="billFirstName" id="billFirstName" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="billFamilyName"&gt;Family Name&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="billFamilyName" id="billFamilyName" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;




<i> </i> &lt;td&gt;&lt;label for="emailaddr"&gt;Email Address&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="emailaddr" id="emailaddr" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="bill_phone"&gt;Contact Telephone Number&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="bill_phone" id="bill_phone" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="billCardNumber"&gt;Credit Card Number&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="billCardNumber" id="billCardNumber" maxlength="30"&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="billCardType"&gt;Credit Card Type&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&lt;input type="text" name="billCardType" id="billCardType" maxlength="30"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Visa/MasterCard&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;label for="instructions"&gt;Special Instructions&lt;/label&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;
<i> </i> &lt;textarea name="instructions" id="instructions" rows="8" cols="30"&gt;Enter your requirements here or comments.&lt;/textarea&gt;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;tr&gt;
<i> </i> &lt;td&gt;&lt;input type="submit" name="Submit" id="Submit" value="Submit order" onfocus="this.blur()" style="cursor:pointer"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input type="reset" name="Reset" id="Reset" value="Reset form" onfocus="this.blur()" style="cursor:pointer"&gt;&lt;/td&gt;
<i> </i> &lt;td&gt;&amp;nbsp;&lt;/td&gt;
<i> </i> &lt;/tr&gt;
<i> </i> &lt;/table&gt;
<i> </i> &lt;/form&gt;




&lt;/div&gt;

&lt;!-- Rightmost column contents --&gt;
&lt;div id="right"&gt;
&lt;h2&gt;Your cart:&lt;/h2&gt;
&lt;div class="cartitems" id="itemlist"&gt;
&lt;p&gt;No items&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;


&lt;!-- Page-wide footer --&gt;
&lt;div id="footer"&gt;
&lt;p&gt;&amp;copy;2007 A&amp;amp;B Ltd.&lt;/p&gt;
&lt;/div&gt;

&lt;script language="javascript" type="text/javascript"&gt;
&lt;!--

// NOTE: do not put this script into the HEAD section
// because it must go AFTER your form in the page's code

var email_format = /[0-9a-z_]+@[0-9a-z_^.]+.[a-z]{2,3}/i;
var name_format = /^[a-zA-Z ]{1,}$/ig;
var number_format = /^[d]+$/g;
var phone_number_format = /[d]{3,11}/g;
var cc_format = /[d]{16}/g;
// SW19 1AA
var postalcode_format = /^[A-Z]{2}[0-9]{2} [0-9]{1}[A-Z]{2}$/g;
var instructions_format = /[0-9a-zA-Z .";-,]{1,}/ig;

var frm = document.forms["orderform"];
var fields = document.forms["orderform"].elements;

fields["instructions"].onfocus = function(){
if(this.value == "Enter your requirements here or comments."){this.value = "";}
else{return;}
}

frm.onsubmit = function(){
for(var k = 0; k &lt; fields.length; k++){
var cur = fields[k];
// here we're going to check all the form fields if they are empty - BEGIN
if(cur.value == ""){
if(navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Opera") != -1){
window.alert("Sorry, " + document.getElementById(cur.id).parentNode.previousSibling.firstChild.innerHTML + " can not be empty! Please, be careful.");
}
if(navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Netscape") != -1){
window.alert("Sorry, " + document.getElementById(cur.id).parentNode.previousSibling.previousSibling.firstChild.innerHTML + " can not be empty! Please, be careful.");
}
cur.focus();
return false;
}
// checking all the form fields if they are empty - END
// here we're going to check non-digital fields format - BEGIN
if(cur.type == "text" &amp;&amp; cur.name != "ship_phone" &amp;&amp; cur.name != "shipHouseNumber" &amp;&amp; cur.name != "shipPostalCode" &amp;&amp; cur.name != "emailaddr" &amp;&amp; cur.name != "bill_phone" &amp;&amp; cur.name != "billCardNumber"){
if(!cur.value.match(name_format)){
if(navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Opera") != -1){
window.alert("Wrong " + document.getElementById(cur.id).parentNode.previousSibling.firstChild.innerHTML + " format! Please, be careful.");
}
if(navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Netscape") != -1){
window.alert("Wrong " + document.getElementById(cur.id).parentNode.previousSibling.previousSibling.firstChild.innerHTML + " format! Please, be careful.");
}
cur.focus();
return false;
}
// checking non-digital fields format - END
}
else{continue;}
}

// here goes digital fields and textarea step by step checking

// now we check ship_phone number format
if(!fields["ship_phone"].value.match(phone_number_format)){window.alert("Sorry, wrong "Contact Telephone Number" format! Please, be careful."); ready = 0; fields["ship_phone"].focus();return false;}
// now we're going to check format of House Number field we let it contain only digits
if(!fields["shipHouseNumber"].value.match(number_format)){window.alert("Sorry, wrong "House Number" format! Please, be careful."); ready = 0; fields["shipHouseNumber"].focus();return false;}
// now we're going to check format of Postal Code field
if(!fields["shipPostalCode"].value.match(postalcode_format)){window.alert("Sorry, wrong "Postal Code" format! Please, be careful."); ready = 0; fields["shipPostalCode"].focus();return false;}
// now we're going to check format of Email field
if(!fields["emailaddr"].value.match(email_format)){window.alert("Sorry, wrong "Email" format! Please, be careful."); ready = 0; fields["emailaddr"].focus();return false;}
// now we check bill_phone number format
if(!fields["bill_phone"].value.match(phone_number_format)){window.alert("Sorry, wrong "Contact Telephone Number" format! Please, be careful."); ready = 0; fields["bill_phone"].focus();return false;}
// now we check Credit Card Number format
if(!fields["billCardNumber"].value.match(cc_format)){window.alert("Sorry, wrong "Credit Card Number" format! This field must contain 16 digits. Please, be careful."); ready = 0; fields["billCardNumber"].focus();return false;}
// now we check Special Instructions format
if(!fields["instructions"].value.match(instructions_format)){window.alert("Sorry, wrong "Special Instructions" format! Do not use special symbols in this field. Please, be careful."); ready = 0; fields["instructions"].focus();return false;}

// if everything good - submit the form
else{return true;}
}
// if the the user reloads the page for some fkn reason
// we reset all the form fields to prevent sending old data
setTimeout('document.forms["orderform"].reset()',100);
//--&gt;
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;


test this validation and if any bug appears contact me via email (below) lets not spam the forum for it is not a chatroom ;-)
×

Success!

Help @nicola13 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...