Exclude the header row in the file to validate

Hi All,

File contains header row.. we need to exclude the header row...no need to validate the first row in the file.
Data in the file should take valid data(two columns)..we need to exclude the more than two columns in the file except the first line.

email|firstname
a|123|100
b|345
c|456|123|123
d|456
e    456 

i need output for the file..

 email|firstname
b|345
d|456 

Thanks,

Something like this?

awk -F"|" 'NR==1 || NF==2' file

Try this..

awk -F "|" ' { if (NR != 1) { if (NF == 2 ) { print } } else { print } }' file

Million's Thanks...working fine as i excepted..

---------- Post updated at 02:43 AM ---------- Previous update was at 02:42 AM ----------

@pamu @Franklin52
Million's Thanks

or Gnu sed

sed -r '/^(.[^|]*)\|(.[^|]*)$/!d' infile